AKS: got an unexpected keyword argument 'status'
See original GitHub issueHello!
- Vote on this issue by adding a π reaction
- To contribute a fix for this issue, leave a comment (and link to your pull request, if youβve opened one already)
Issue details
Hi, I am trying to create a AKS cluster with AAD pod identity capability:
from urllib.request import urlretrieve
import pulumi
import pulumi_azure as azure
import pulumi_kubernetes as kubernetes
RG = "zz"
LOCATION = "uksouth"
# Resource Group
rg = azure.core.ResourceGroup(
"rg",
name=RG,
location=LOCATION,
)
# Cluster
aks = azure.containerservice.KubernetesCluster(
"aks",
name="aks",
resource_group_name=rg.name,
location=rg.location,
dns_prefix="aks000aks",
network_profile=azure.containerservice.KubernetesClusterNetworkProfileArgs(
network_plugin="azure",
),
default_node_pool=azure.containerservice.KubernetesClusterDefaultNodePoolArgs(
name="default",
node_count=1,
vm_size="Standard_F8s_v2",
),
role_based_access_control=azure.containerservice.KubernetesClusterRoleBasedAccessControlArgs(
enabled=True,
),
identity=azure.containerservice.KubernetesClusterIdentityArgs(
type="SystemAssigned",
),
)
# Kubectl
aks_provider = kubernetes.Provider(
"aks",
kubeconfig=aks.kube_config_raw,
)
# AAD Pod Identity (https://azure.github.io/aad-pod-identity/docs/demo/standard_walkthrough)
urls = [
"https://raw.githubusercontent.com/Azure/aad-pod-identity/master/deploy/infra/deployment-rbac.yaml",
"https://raw.githubusercontent.com/Azure/aad-pod-identity/master/deploy/infra/mic-exception.yaml",
]
for url in urls:
yaml = url.split("/")[-1]
urlretrieve(url, yaml)
_ = kubernetes.yaml.ConfigFile(
yaml,
file=yaml,
opts=pulumi.ResourceOptions(provider=aks_provider),
)
But I get:
$ pulumi preview
Previewing update (dev):
Type Name Plan Info
+ pulumi:pulumi:Stack cyclecloud-dev create 3 errors
+ ββ kubernetes:yaml:ConfigFile deployment-rbac.yaml create
+ β ββ kubernetes:core/v1:ServiceAccount default/aad-pod-id-nmi-service-account create
+ β ββ kubernetes:core/v1:ServiceAccount default/aad-pod-id-mic-service-account create
+ β ββ kubernetes:rbac.authorization.k8s.io/v1:ClusterRole aad-pod-id-nmi-role create
+ β ββ kubernetes:apps/v1:DaemonSet default/nmi create
+ β ββ kubernetes:rbac.authorization.k8s.io/v1:ClusterRoleBinding aad-pod-id-mic-binding create
+ β ββ kubernetes:rbac.authorization.k8s.io/v1:ClusterRoleBinding aad-pod-id-nmi-binding create
+ β ββ kubernetes:apps/v1:Deployment default/mic create
+ β ββ kubernetes:rbac.authorization.k8s.io/v1:ClusterRole aad-pod-id-mic-role create
+ ββ kubernetes:yaml:ConfigFile mic-exception.yaml create
+ β ββ kubernetes:aadpodidentity.k8s.io/v1:AzurePodIdentityException default/mic-exception create
+ β ββ kubernetes:aadpodidentity.k8s.io/v1:AzurePodIdentityException kube-system/aks-addon-exception create
+ ββ azure:core:ResourceGroup rg create
+ ββ azure:containerservice:KubernetesCluster aks create
+ ββ pulumi:providers:kubernetes aks create
Diagnostics:
pulumi:pulumi:Stack (cyclecloud-dev):
error: Program failed with an unhandled exception:
error: Traceback (most recent call last):
File "/usr/local/bin/pulumi-language-python-exec", line 92, in <module>
loop.run_until_complete(coro)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/usr/lib/python3.9/site-packages/pulumi/runtime/stack.py", line 110, in run_in_stack
await run_pulumi_func(lambda: Stack(func))
File "/usr/lib/python3.9/site-packages/pulumi/runtime/stack.py", line 45, in run_pulumi_func
await wait_for_rpcs()
File "/usr/lib/python3.9/site-packages/pulumi/runtime/stack.py", line 65, in wait_for_rpcs
await RPC_MANAGER.rpcs.pop()
File "/usr/lib/python3.9/site-packages/pulumi/runtime/rpc_manager.py", line 65, in rpc_wrapper
result = await rpc
File "/usr/lib/python3.9/site-packages/pulumi/runtime/resource.py", line 592, in do_register_resource_outputs
serialized_props = await rpc.serialize_properties(outputs, {})
File "/usr/lib/python3.9/site-packages/pulumi/runtime/rpc.py", line 149, in serialize_properties
result = await serialize_property(v, deps, input_transformer, get_type(k), keep_output_values)
File "/usr/lib/python3.9/site-packages/pulumi/runtime/rpc.py", line 290, in serialize_property
value = await serialize_property(output.future(), deps, input_transformer, typ, keep_output_values=False)
File "/usr/lib/python3.9/site-packages/pulumi/runtime/rpc.py", line 276, in serialize_property
future_return = await asyncio.ensure_future(awaitable)
File "/usr/lib/python3.9/site-packages/pulumi/output.py", line 119, in get_value
val = await self._future
File "/usr/lib/python3.9/site-packages/pulumi/output.py", line 160, in run
value = await self._future
File "/usr/lib/python3.9/site-packages/pulumi/output.py", line 418, in gather_futures
return await asyncio.gather(*value_futures_list)
File "/usr/lib/python3.9/site-packages/pulumi/output.py", line 119, in get_value
val = await self._future
File "/usr/lib/python3.9/site-packages/pulumi/output.py", line 160, in run
value = await self._future
File "/usr/lib/python3.9/site-packages/pulumi/output.py", line 181, in run
transformed: Input[U] = func(value)
File "/usr/lib/python3.9/site-packages/pulumi_kubernetes/yaml.py", line 543, in <lambda>
CustomResourceDefinition(f"{x}", opts, **obj)))]
File "/usr/lib/python3.9/site-packages/pulumi_kubernetes/apiextensions/v1/CustomResourceDefinition.py", line 126, in __init__
__self__._internal_init(resource_name, *args, **kwargs)
TypeError: _internal_init() got an unexpected keyword argument 'status'
error: an unhandled error occurred: Program exited with non-zero exit code: 1
Steps to reproduce
pulumi preview
Expected: deploy Actual: error above
Any ideas?
Thanks
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:7 (1 by maintainers)
Top Results From Across the Web
How to fix Firebase_Admin Error TypeError: __init__() got an ...
This is caused due to the outdated urllib3 package. I resolved this error with the following solution. You can try it as well....
Read more >azureml.core.webservice.AksWebservice class - Microsoft Learn
Represents a machine learning model deployed as a web service endpoint on Azure Kubernetes Service. A deployed service is created from a model,...
Read more >Long Callbacks | Dash for Python Documentation | Plotly
Most web servers have a 30 second timeout by default, which is an issue for ... Dash app constructor as the long_callback_manager keyword...
Read more >kfp.dsl.Condition - Kubeflow Pipelines SDK API - Read the Docs
No information is available for this page.
Read more >azure-identity - PyPI
Passing the keyword arguments below generally won't cause a runtime error, but the arguments have no effect. Removed authenticate method fromΒ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Got the same error but I workarounded it like this:
Should be a typing annotation:
from typing import Any
.