kubectl expose deployment/nginx-deployment --type=NodePor
kubectl describe services nginx-deployment
<public-node-ip>
:<node-port>
<node-port>
kubectl delete services nginx-deployment
kubectl delete deployment nginx-deployment
kubectl get nodes -o wide
kubectl get pods -o wide
kubectl get deploy
kubectl get service
kubectl get secret
kubectl rollout status deployment/my-nginx-release
kubectl rollout history deployment/my-nginx-release
kubectl describe pod my-nginx-release-659d46fcd4-w5s8h
(可以查看镜像部署状态以及报错详细信息)在/root/.ssh/目录下:
[root@localhost .ssh]# tree -a
.
├── authorized_keys
├── id_dsa
├── id_dsa.pub
├── id_rsa
├── id_rsa_2048_9417.pub
├── id_rsa.pub
└── known_hosts
.ssh
文件夹,则创建并设置权限:chmod 700 ~/.ssh
.ssh
目录下生成公钥私钥:ssh-keygen -t rsa
其中 id_dsa
,id_rsa
是私钥,id_rsa.pub
,id_dsa.pub
是公钥authorized_keys
文件存放其他主机的公钥,其他主机即可ssh登录该机,此文件的权限:chmod 644 ~/.ssh/authorized_keys
know_hosts
记录主机登陆过的其他主机的公钥信息ssh-keygen -t rsa
,生成 id_rsa
和 id_rsa.pub
id_rsa.pub
和 B 的 id_rsa.pub
内容追加到C主机的 authorized_keys
中,A 和 B 可以通过 ssh C
登录,exit
退出。 ssh
$ cat authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvqtPwT7kjfKzycR7r0FLe+UgxOSoeOW9EVb6eUb9MsO5IHvlVBKJK6F62dc5BNgemkwR8/UUDQ6tK4DMWipHI+t8naxgyXl9Kdc7oh78c/ADW1svBkrV3qOfxey/z+8ykN+kCgk7q65NytllpQH3FAi7b/0mO3cAEQWGSAC5wSG7XOamMmL4CLjhhLGwLwIAni50nOTBVVBjrXVn10EW4Bwcv+tH7KAIlZ+kZuatOUMIYyuBWleBokJzgQm2joQfe9RiO2Ayja6O4CpJSj0g3Efkb0bdxaOxYrgigp/0