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
Posted By - | Karan Gupta |
|
Posted On - | Wednesday, January 31, 2024 |
|
Updated On - | Saturday, February 3, 2024 |