我正在关注kubernetes.io上的hellonode教程
http://kubernetes.io/docs/hellonode/
我在尝试执行"创建您的广告连播"部分时遇到错误.
当我运行此命令(用我创建的PROJECT_ID替换PROJECT_ID)时,我得到以下内容:
$ kubectl run hello-node --image=gcr.io/PROJECT_ID/hello-node:v1 --port=8080
The connection to the server localhost:8080 was refused - did you specify the right host or port?
Run Code Online (Sandbox Code Playgroud)
我只是输入kubectl版本时遇到类似的错误:
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.2", GitCommit:"528f879e7d3790ea4287687ef0ab3f2a01cc2718", GitTreeState:"clean"}
The connection to the server localhost:8080 was refused - did you specify the right host or port?
Run Code Online (Sandbox Code Playgroud)
我不知道该怎么做,因为除了遵循本教程的步骤之外我没有使用kubernetes的经验.
我想出了这个问题.在这Create your cluster节我错过了一个关键步骤.
我错过的步骤是: Please ensure that you have configured kubectl to use the cluster you just created.配置的部分是如何执行此操作的链接:
步骤如下:
gcloud config set project PROJECT
gcloud config set compute/zone ZONE
gcloud config set container/cluster CLUSTER_NAME
gcloud container clusters get-credentials CUSTER_NAME
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3779 次 |
| 最近记录: |