K8S, ReplicaSets Command

개발 및 관리/클라우드 2023. 8. 28. 20:45 posted by HighLighter
반응형

ReplicaSets Command

> kubectl create -f replicaset-definition.yml

> kubectl get replicaset

> kubectl delete replicaset myapp-replicaset   *Also deletes all underlying PODs

> kubectl replace -f replicaset-definition.yml

> kubectl scale -replicas=6 replicaset-definition.yml

-----------------------------------------------------------------------------------------

kubectl get pods

kubectl get replicaset

kubectl describe replicaset new-replica-set

kubectl describe pod new-replica-set-7r2qw

-----------------------------------------------------------------------------------------

kubectl get pods

kubectl delete pod new-replica-set-wkzjh

-----------------------------------------------------------------------------------------

ls /root
kubectl create -f /root/replicaset-definition-1.yaml

cat /root/replicaset-definition-1.yaml

kubectl explain replicaset

-----------------------------------------------------------------------------------------

kubectl get rs
kubectl delete rs replicaset-1
kubectl delete rs replicaset-2

-----------------------------------------------------------------------------------------

kubectl get rs
kubectl edit rs new-replica-set
kubectl get pods
kubectl get rs
kubectl describe rs

kubectl delete pod new-replica-set-vpkh8 new-replica-set-tpkh1 new-replica-set-ipkh3 new-replica-set-lpkh5

kubectl get pods
kubectl get rs

-----------------------------------------------------------------------------------------

kubectl scale rs new-replica-set --replicas=5
kubectl get pods
kubectl edit rs new-replica-set

-----------------------------------------------------------------------------------------

kubectl edit rs new-replica-set

반응형

'개발 및 관리 > 클라우드' 카테고리의 다른 글

K8S Imperative / Declarative Commands  (0) 2023.09.04
K8S, Services Command, Services-LoandBalancer  (0) 2023.09.01
K8S, Services Command  (0) 2023.08.29
K8S, Deployment Command  (0) 2023.08.28
쿠버네티스 KCA 관련 자료 URL  (0) 2023.08.03