kubernetes manual expansion


k8s manual expansion

We find k8s-master node.Input the Command:

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

trouble cleaning

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