Zero to Hero
Published 2021. 10. 25. 14:00
k8s commands 02 Programming

kubectl get namespaces

kubectl get pods --namespace=NAMESPACE_NAME

kubectl run POD_NAME --image=IMAGE_NAME --namespace=NAMESPACE_NAME

kubectl delete pod POD_NAME --namespace=NAMESPACE_NAME

kubectl get pods --all-namespaces

kubectl -n dev get svc

db-service.dev.svc.cluster.local

 

kubectl expose deployment nginx --port 80

 

Imperative

kubectl edit deployment nginx

kubectl replace -f nginx.yaml (apply with difference)

kubectl replace --force -f nginx.yaml (remove and apply)

 

Declarative

kubectl apply -f nginx.yaml

kubectl apply -f /path/yo/config-files

kubectl apply -f nginx.yaml

'Programming' 카테고리의 다른 글

k8s commands 04  (0) 2021.10.31
k8s commands 03  (0) 2021.10.26
k8s commands 01  (0) 2021.10.23
Spring Batch Test 클래스 설정 방법  (0) 2021.10.07
PageableExecutionUtils.getPage()  (0) 2021.08.28
profile

Zero to Hero

@Doljae

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!