kube部屬應用
kubectl create deployment myweb --image=httpd
kubectl expose deployment myweb --type="NodePort" --port=80
Scale 應用
kubectl scale deployment myweb --replicas 3
kubectl get deployment
kubectl scale deployment myweb --replicas 2
kubectl get deployment
docker images | grep httpd
滾動更新
kubectl create deployment myweb2 --image=httpd:2.4.43
kubectl get deployment
kubectl describe pod [Name]
kubectl set image deployment myweb2 httpd=httpd:2.4.46
kubectl get deployment myweb2 -o yaml | grep name
kubectl set image deployment myweb2 httpd=httpd:2.4.46
kubectl describe pod [Name]
kubectl rollout undo deployment myweb2
kubectl describe pod [Name]
kubectl delete pod [Name]
kubectl get pod -o wide
nodeport cluster
kubectl get pod -n kube-system
kubectl create ns myns
kubectl create deployment myweb3 --image=httpd -n=myns
kubectl get deployment -n default
kubectl get deployment -n myns
kubectl get deployment --all-namespaces
kubectl get pod -n default
kubectl get pod -n myns
kubectl get pod --all-namespace
安裝 kubelet、kubeadm、kubectl
kubectl get pod -o wide
kubectl exec [Name] date
kubectl exec [Name] -it -- bash
apt install net-tools
kubectl describe pod [Name]
kubectl exec [Name] date
kubectl exec [Name] echo "hi"
kubectl exec [Name] -it bash
kubectl describe svc myweb