我正在嘗試關注帶有Azure的Kubernetes官方教程this。我在Mac和Linux上都試過了。Linux和Mac上的Azure CLI:證書問題
我能成功地從CLI登錄我公司賬戶,但是當我在輸出結束時運行./create-kubernetes-cluster.js
我看到
info: Executing command network vnet create
info: Using default address space cidr: 12
info: Using default subnet start IP: 172.16.0.0
info: Using default subnet cidr: 15
+ Looking up network configuration
error: The server failed to authenticate the request. Verify that the certificate is valid and is associated with this subscription.
info: Error information has been recorded to /home/dds/.azure/azure.err
error: network vnet create command failed
這是關於什麼證書?它來自哪裏?
這裏是azure.err
:
[Error: The server failed to authenticate the request. Verify that the certificate is valid and is associated with this subscription.]
stack: [Getter/Setter],
code: 'ForbiddenError',
statusCode: 403,
__frame:
{ name: 'get__3',
line: 47,
file: '/home/dds/k8s/src/kubernetes/docs/getting-started-guides/coreos/azure/node_modules/azure-cli/lib/commands/asm/network/networkConfig.js',
prev:
{ name: 'create__1',
line: 34,
file: '/home/dds/k8s/src/kubernetes/docs/getting-started-guides/coreos/azure/node_modules/azure-cli/lib/commands/asm/network/virtualNetwork.js',
prev: [Object],
calls: 1,
active: false,
offset: 4,
col: 43 },
calls: 0,
active: false,
offset: 4,
col: 59 },
rawStack: [Getter] }
Error: The server failed to authenticate the request. Verify that the certificate is valid and is associated with this subscription.
<<< async stack >>>
at get__3 (/home/dds/k8s/src/kubernetes/docs/getting-started-guides/coreos/azure/node_modules/azure-cli/lib/commands/asm/network/networkConfig.js:51:60)
at create__1 (/home/dds/k8s/src/kubernetes/docs/getting-started-guides/coreos/azure/node_modules/azure-cli/lib/commands/asm/network/virtualNetwork.js:38:44)
at __6 (/home/dds/k8s/src/kubernetes/docs/getting-started-guides/coreos/azure/node_modules/azure-cli/lib/commands/asm/network/network.js:125:22)
<<< raw stack >>>
at Function.ServiceClient._normalizeError (/home/dds/k8s/src/kubernetes/docs/getting-started-guides/coreos/azure/node_modules/azure-cli/node_modules/azure-common/lib/services/serviceclient.js:815:23)
at /home/dds/k8s/src/kubernetes/docs/getting-started-guides/coreos/azure/node_modules/azure-cli/node_modules/azure-common/lib/services/filters/errorhandlingfilter.js:44:29
at Request._callback (/home/dds/k8s/src/kubernetes/docs/getting-started-guides/coreos/azure/node_modules/azure-cli/node_modules/azure-common/lib/http/request-pipeline.js:109:14)
at Request.self.callback (/home/dds/k8s/src/kubernetes/docs/getting-started-guides/coreos/azure/node_modules/azure-cli/node_modules/azure-common/node_modules/request/request.js:199:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request.<anonymous> (/home/dds/k8s/src/kubernetes/docs/getting-started-guides/coreos/azure/node_modules/azure-cli/node_modules/azure-common/node_modules/request/request.js:1160:14)
at emitOne (events.js:82:20)
at Request.emit (events.js:169:7)
at IncomingMessage.<anonymous> (/home/dds/k8s/src/kubernetes/docs/getting-started-guides/coreos/azure/node_modules/azure-cli/node_modules/azure-common/node_modules/request/request.js:1111:12)
你能告訴我怎樣才能解決這個問題?
更新
我創建了Azure的支持票,他們告訴我:
我看到大部分的資源提供者沒有登記爲您 訂閱。部署(第一次)通過門戶寄存器進行 資源提供自動,但如果通過PowerShell的或CLI 我們對這些必須進行登記(一次活動)
https://azure.microsoft.com/en-in/documentation/articles/azure-cli-arm-commands/請運行這些cmdlet以註冊商&然後重試 部署
azure provider register –namespace Microsoft.Network
azure provider register –namespace Microsoft.Compute
azure provider register –namespace Microsoft.ContainerService
azure provider register –namespace Microsoft.ResourceHealth
azure provider register –namespace Microsoft.Storage
我成功地執行這些命令,但結果還是一樣。
正在運行什麼kubernetes? hyperkube或直線命令行版本? –
從當前主分支中克隆的Kubernetes。從我提到的教程中完全步驟。 – dds
@colemickens你關於Kubernetes和Azure的事情,也許你知道這個答案。 –