目录

kubernetes manual expansion

k8s manual expansion

We find k8s-master node.Input the Command:

  1. expand
1
kubectl scale --replicas=3 deploy my-test-deploy
  1. shrink
1
kubectl scale --replicas=1 deploy my-test-deploy

trouble cleaning

  1. get resource list
1
2
3
4
5
6
7
kubectl get deployment
kubectl get pods
kubectl get nodes
# exists in the namespace
kubectl api-resources --namespaced=true
# not exists in the namespace
kubectl api-resources --namespaced=false
  1. show info
1
2
kubectl describe pod my-test-pod
kubectl describe deployment my-test-pod
  1. exec container
1
kubectl exec -ti my-test-pod /bin/bash