ReplicaSet YAML Walkthrough

If you are new to the replica set you can read the replica set blog here

Let’s understand the replica set the YAML file.

apiVersion

$ kubectl api-versions

kind:

$ kubectl api-resources | awk '{print $5}'

metadata:

Spec:

In the spec section, we have three fields — replicas, selector, and template

Now, we can use two types of selectors in replicaset (Equality/Set)

Equality based Selectors (matchLabels)

Set-Based Selectors (matchExpressions)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store