学习成长

提供在线文档,方便大家学习


常用命令

<p><strong>创建</strong>   </p> <pre><code>kubectl create -f dashboard.yaml  </code></pre> <p><strong>删除</strong></p> <pre><code>kubectl delete -f dashboard.yaml  </code></pre> <p><strong>查看pods</strong></p> <pre><code>kubectl get pods --namespace=kube-system</code></pre> <p><strong>查看pod明细</strong></p> <pre><code>kubectl describe service/kubernetes-dashboard --namespace="kube-system"</code></pre> <p><strong>查看pod日志</strong></p> <pre><code>kubectl logs kubernetes-dashboard-latest-139424868-tdc0t --namespace=kube-system </code></pre> <p><strong>进入容器终端</strong></p> <pre><code>kubectl exec -it nginx-controller-527tr -- /bin/bash</code></pre> <p><strong>运行容器(指定命名空间,数量,镜像名称)</strong></p> <pre><code>kubectl run con-log-svr --image=docker.prod.prg.com:5000/qiwuiot-prod-con-log-svr --replicas=1 --namespace="qiwuiot-prod"</code></pre> <p><strong>创建token</strong></p> <pre><code>kubeadm token create --print-join-command</code></pre> <p><img src="https://www.showdoc.cc/server/api/common/visitfile/sign/3d6a81609d4e0bd31907320e7f34c828?showdoc=.jpg" alt="" /></p> <p><strong>重置kubeadm</strong></p> <pre><code>kubeadm reset</code></pre>

页面列表

ITEM_HTML