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)
- An Introduction of GitLab Duo - December 22, 2024
- Best Hospitals for affordable surgery for medical tourism - December 20, 2024
- Top Global Medical Tourism Companies in the World - December 20, 2024