Kubernetes dla każdego – sztuka konteneryzacji
Deployment
jeśli nie musimy używać konkretnie ReplicaSetkubectl create -f replicaset.yaml
utworzenie ReplicaSet
kubectl get rs
wypisuje ReplicaSet
kubectl get pod -w
wypisuje pody na bieżąco
kubectl scale rs <replicaSetName> --replicas=4
skalowanie replicaSet
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: replicaset-app
labels:
app: replicaset-app
type: frontend
spec:
template:
{POD}
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: frontend
spec:
replicas: 3
selector:
matchLabels:
app: frontend
template:
metadata:
labels:
app: frontend
spec:
containers:
- name: frontend
image: "nginx:1.17.3"