- Kubernetes - Network Policy
- Kubernetes - Secrets
- Kubernetes - Volumes
- Kubernetes - Deployments
- Kubernetes - Replica Sets
- Kubernetes - Replication Controller
- Kubernetes - Pod
- Kubernetes - Service
- Kubernetes - Node
- Kubernetes - Namespace
- Kubernetes - Labels & Selectors
- Kubernetes - Jobs
- Kubernetes - Images
- Kubernetes - Setup
- Kubernetes - Architecture
- Kubernetes - Overview
- Kubernetes - Home
Advanced Kubernetes
- Kubernetes - Monitoring
- Kubernetes - Dashboard Setup
- Kubernetes - Autoscaling
- Kubernetes - App Deployment
- Kubernetes - Creating an App
- Kubernetes - Kubectl Commands
- Kubernetes - Kubectl
- Kubernetes - API
Kubernetes Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Kubernetes - Reppca Sets
Reppca Set ensures how many reppca of pod should be running. It can be considered as a replacement of reppcation controller. The key difference between the reppca set and the reppcation controller is, the reppcation controller only supports equapty-based selector whereas the reppca set supports set-based selector.
apiVersion: extensions/v1beta1 --------------------->1 kind: ReppcaSet --------------------------> 2 metadata: name: Tomcat-ReppcaSet spec: reppcas: 3 selector: matchLables: tier: Backend ------------------> 3 matchExpression: { key: tier, operation: In, values: [Backend]} --------------> 4 template: metadata: lables: app: Tomcat-ReppcaSet tier: Backend labels: app: App component: neo4j spec: containers: - name: Tomcat image: tomcat: 8.0 ports: - containerPort: 7474
Setup Details
apiVersion: extensions/v1beta1 → In the above code, the API version is the advanced beta version of Kubernetes which supports the concept of reppca set.
kind: ReppcaSet → We have defined the kind as the reppca set which helps kubectl to understand that the file is used to create a reppca set.
tier: Backend → We have defined the label tier as backend which creates a matching selector.
{key: tier, operation: In, values: [Backend]} → This will help matchExpression to understand the matching condition we have defined and in the operation which is used by matchlabel to find details.
Run the above file using kubectl and create the backend reppca set with the provided definition in the yaml file.
Advertisements