improve readme for kubeconfig

pull/12/head
Yongguang Zhu 6 years ago
parent 9b01d419f5
commit 7611e7d49f

@ -107,7 +107,21 @@ $ TOKEN=$(kubectl -n kube-system describe secret default| awk '$1=="token:"{prin
kubectl config set-credentials docker-for-desktop --token="${TOKEN}" kubectl config set-credentials docker-for-desktop --token="${TOKEN}"
``` ```
#### 选择 kubeconfig 文件 对于Windows
首先执行如下命令得到dashboard-admin-token的token值
```cmd
kubectl describe secret -n kube-system dashboard-admin-token
```
复制token值 执行如下命令设置kubeconfig
```cmd
$TOKEN="YOUR_TOKEN_COPY_FROM_ABOVE"
kubectl config set-credentials docker-for-desktop --token="${TOKEN}"
```
#### 登录dashboard的时候选择 kubeconfig 文件
![resource](images/k8s_credentials.png) ![resource](images/k8s_credentials.png)
@ -194,6 +208,7 @@ helm repo update
```shell ```shell
# Use Chocolatey on Windows # Use Chocolatey on Windows
# 注安装的时候需要保证网络能够访问googleapis这个域名
choco install kubernetes-helm choco install kubernetes-helm
# Install Tiller into your Kubernetes cluster # Install Tiller into your Kubernetes cluster

@ -108,6 +108,20 @@ $ TOKEN=$(kubectl -n kube-system describe secret default| awk '$1=="token:"{prin
kubectl config set-credentials docker-for-desktop --token="${TOKEN}" kubectl config set-credentials docker-for-desktop --token="${TOKEN}"
``` ```
For Windows
First get value of dashboard-admin-token with below command:
```cmd
kubectl describe secret -n kube-system dashboard-admin-token
```
copy this value and run below command to setup kubeconfig
```cmd
$TOKEN="YOUR_TOKEN_COPY_FROM_ABOVE"
kubectl config set-credentials docker-for-desktop --token="${TOKEN}"
```
#### Choose kubeconfig file (Optional) #### Choose kubeconfig file (Optional)
![resource](images/k8s_credentials.png) ![resource](images/k8s_credentials.png)
@ -125,6 +139,8 @@ Click login, go to Kubernetes Dashboard
Install helm following the instruction on https://github.com/helm/helm/blob/master/docs/install.md Install helm following the instruction on https://github.com/helm/helm/blob/master/docs/install.md
#### For Mac OS
```shell ```shell
# Use homebrew on Mac # Use homebrew on Mac
brew install kubernetes-helm brew install kubernetes-helm
@ -136,6 +152,20 @@ helm init --upgrade -i registry.cn-hangzhou.aliyuncs.com/google_containers/tille
helm repo update helm repo update
``` ```
#### For Windows
```shell
# Use Chocolatey on Windows
# NOTE: please ensure you can access googleapis
choco install kubernetes-helm
# Install Tiller into your Kubernetes cluster
helm init --upgrade -i registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.11.0 --skip-refresh
# update charts repo (Optional)
helm repo update
```
### Install Istio ### Install Istio
More details can be found in https://istio.io/docs/setup/kubernetes/ More details can be found in https://istio.io/docs/setup/kubernetes/

Loading…
Cancel
Save