In the ReplicaSet, .spec.template.metadata.labels must match spec.selector, or it will be rejected by the API.
The .spec.selector field is a label selector. As discussed earlier these are the labels used to identify potential Pods to acquire. In our frontend.yaml example, the selector was:
Note: For 2 ReplicaSets specifying the same .spec.selector but different .spec.template.metadata.labels and .spec.template.spec fields, each ReplicaSet ignores the Pods created by the other ReplicaSet.
Replicas
Kubernetes Crash Course What is Kubernetes Session 1-By DevOpsSchool
Kubernetes Crash Course Kubernetes Architecture with Worker Session 2-By DevOpsSchool
Kubernetes Crash Course Clustor Setup using Kubeadm Session 3-By DevOpsSchool
Kubernetes Crash Course Deep dive into kubernetes Pods Session 4-By DevOpsSchool
Kubernetes Crash Course Deep Dive into Kubernetes Replication Controllers Session 5-By DevOpsSchool
Kubernetes Crash Course Deep Dive into Kubernetes Deployment Session 6-By DevOpsSchool
Kubernetes Crash Course Deep Dive into Kubernetes service Session 7-By DevOpsSchool
Latest posts by Rajesh Kumar (see all)
- Best AI tools for Software Engineers - November 4, 2024
- Installing Jupyter: Get up and running on your computer - November 2, 2024
- An Introduction of SymOps by SymOps.com - October 30, 2024