学习成长

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


dashboard安装

<p><strong>拉取kubernets-dashboard镜像</strong></p> <pre><code>docker pull registry.cn-hangzhou.aliyuncs.com/google-containers/kubernetes-dashboard-amd64:v1.6.0</code></pre> <p><strong>修改成本地镜像</strong></p> <pre><code>docker tag registry.cn-hangzhou.aliyuncs.com/google-containers/kubernetes-dashboard-amd64:v1.6.0 192.168.1.20:5000/kubernetes-dashboard-amd64:v1.6.0</code></pre> <p><strong>删除远程镜像</strong></p> <pre><code>docker rmi registry.cn-hangzhou.aliyuncs.com/google-containers/kubernetes-dashboard-amd64:v1.6.0</code></pre> <p><strong>dashboard.yaml安装文件内容如下</strong></p> <pre><code>kind: ReplicationController apiVersion: v1 metadata: labels: app: kubernetes-dashboard name: kubernetes-dashboard namespace: kube-system spec: replicas: 1 selector: app: kubernetes-dashboard template: metadata: labels: app: kubernetes-dashboard spec: containers: - name: kubernetes-dashboard image: docker.uat.prg.com:5000/kub-dashboard:latest #lanny/gcr.io_google_containers_kubernetes-dashboard-amd64:v1.8.1 #docker.uat.prg.com:5000/kub-dashboard:latest ports: - containerPort: 9090 args: - --apiserver-host=http://192.168.1.40:8080 - --heapster-host=http://192.168.1.25:30002 --- kind: Service apiVersion: v1 metadata: labels: app: kubernetes-dashboard name: kubernetes-dashboard namespace: kube-system spec: type: NodePort ports: - port: 7960 targetPort: 9090 nodePort: 30000 selector: app: kubernetes-dashboard</code></pre> <p><strong>安装命令</strong></p> <pre><code>kubectl create -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>

页面列表

ITEM_HTML