Bluemix
获取集群的访问权限
先决条件
要获取集群的访问权,请下载和安装一些 CLI 工具 和 IBM Cloud Container Service 插件。
Download the IBM Cloud CLI.
Download the Kubernetes CLI.
Install the container service plugin.
bx plugin install container-service -r Bluemix
获取集群的访问权限
- Log in to your IBM Cloud account.
bx login -a https://api.ng.bluemix.net
bx cs region-set us-south
如果具有联合标识,使用 bx login –sso 来登录到 IBM Cloud CLI。
- Set the context for the cluster in in your CLI.
a. Get the command to set the environment variable and download the Kubernetes configuration files.
bx cs cluster-config yuxizhe
b. Set the KUBECONFIG environment variable. Copy the output from the previous command and paste it in your terminal. The command output should look similar to the following.
export KUBECONFIG=/Users/ibm/.bluemix/plugins/container-service/clusters/yuxizhe/kube-config-hou02-yuxizhe.yml
另外,您可以直接下载 kubeconfig 文件来手动配置 kubernetes 集群环境。
- Verify that you can connect to your cluster by listing your worker nodes.
kubectl get nodes
View information about your cluster via Kubernetes dashboard
- Start a proxy to Kubernetes API server.
kubectl proxy
- View your Kubernetes dashboard.