使用Azure CLI版本2.0.20,我突然无法再创建ACS群集了。
已使用以下命令创建资源组testrg:
az group create -l westus -n testrg
az aks和acs都失败了。使用的命令:
az aks create -n test-k8s-stg -g testrg
az acs create --orchestrator-type=kubernetes --resource-group testrg --name=test-nix-stg --admin-username test-admin --admin-password TestPassword --generate-ssh-keys
两者都失败并出现错误:
Insufficient privileges to complete the operation.
Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\main.py", line 36, in main
cmd_result = APPLICATION.execute(args)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\core\application.py", line 212, in execute
result = expanded_arg.func(params)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\core\commands\__init__.py", line 377, in __call__
return self.handler(*args, **kwargs)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\core\commands\__init__.py", line 630, in _execute_command
raise client_exception
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\core\commands\__init__.py", line 620, in _execute_command
reraise(*sys.exc_info())
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\six.py", line 693, in reraise
raise value
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\core\commands\__init__.py", line 602, in _execute_command
result = op(client, **kwargs) if client else op(**kwargs)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\command_modules\acs\custom.py", line 516, in acs_create
dns_name_prefix, location, name)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\command_modules\acs\custom.py", line 1372, in _ensure_service_principal
service_principal = _build_service_principal(client, name, url, client_secret)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\command_modules\acs\custom.py", line 319, in _build_service_principal
result = create_application(client.applications, name, url, [url], password=client_secret)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\command_modules\acs\custom.py", line 970, in create_application return client.create(app_create_param)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\graphrbac\operations\applications_operations.py", line 87, in create
raise models.GraphErrorException(self._deserialize, response)
azure.graphrbac.models.graph_error.GraphErrorException: Insufficient privileges to complete the operation.
我可以使用CLI创建其他资源,例如带有命令的Web应用程序:
az appservice plan create -g testrg-n B1Plan --is-linux
az webapp create --resource-group testrg --name testwebapp -p B1Plan -r "node|8.1"
答案 0 :(得分:1)
正如Weinong Wang指出的那样,我必须向现有服务主体提供其客户机密的AppId,因为我没有权限为集群创建新的服务主体。
创建新集群并配置kubectl以连接到它的命令是:
styles.css