Deploy Replica Set in Kubernetes Cluster
How to Set Up a Replica Set in a Kubernetes Cluster

Infosec Poet and CAP-certified DevOps/SecOps Engineer, passionate about security, creativity, and continuous learning.
Tasks
Create a ReplicaSet using the
nginximage with thelatesttag (specify asnginx:latest) and name itnginx-replicaset.Apply labels:
appasnginx_app,typeasfront-end.Name the container
nginx-container. Ensure the replica count is4.
Steps
Create a manifest file name it as
replicaset.yaml.apiVersion: apps/v1 kind: ReplicaSet metadata: name: nginx-replicaset spec: replicas: 4 selector: matchLabels: app: nginx_app type: front-end template: metadata: labels: app: nginx_app type: front-end spec: containers: - name: nginx-container image: nginx:latest
Now apply the configuration in k8s cluster.
kubectl apply -f replicaset.yaml
Get replicaset
kubectl get replicaset
Check the description of this replicaset.
kubectl describe replicaset nginx-replicaset
#k8s #kubernetes #replicaset





