Articles → DOCKER → Replica Set In Kubernetes
Replica Set In Kubernetes
Purpose
Prerequisite
Create A YAML File
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: my-replicaset
spec:
replicas: 3
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: my-container
image: nginx:latest
ports:
- containerPort: 80
kubectl apply -f replicaset.yaml
Kubectl Get Rs Command