1 命令集合123
1.1查看集群信息
kubectl cluster-info
输出信息如下:
Kubernetes master is running at https://192.168.3.71:6443
KubeDNS is running at https://192.168.3.71:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
查看集群证书有效期:
kubeadm alpha certs check-expiration
1.2 pod
命令创建一个pod
kubectl run --image=nginx --port=80 nginx0920
以上port为容器里面服务的端口。
输入pod的yaml文件