-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kubernetes.helm.v4.Chart
: failed to parse kubeconfig data
on preview
#3027
Comments
@yellowhat there's a problem with the provider's configuration. Are you setting the The |
Sure. kubeconfig = local.Command(
f"{name}/kubeconfig",
create=Output.all(self.cp.ipv4_address).apply(lambda args: f"""
mkdir -p /root/.kube
scp {args[0]}:/etc/rancher/k3s/k3s.yaml /root/.kube/config
sed -e "s|https://.*|https://{args[0]}:6443|" \
-i /root/.kube/config
"""),
opts=ResourceOptions(
parent=child_opts.parent,
depends_on=[bootstrap],
),
)
self.kubeconfig = kubernetes.Provider(
name,
kubeconfig="/root/.kube/config",
opts=ResourceOptions(
parent=child_opts.parent,
depends_on=[kubeconfig],
),
) Before and after Thanks |
Thanks for the explanation, it all makes sense. The provider is no doubt failing to find |
@yellowhat another suggestion is to use the |
Thanks for the explanation. As you suggested I have run before mkdir -p ~/.kube
touch ~/.kube/config and it is still trying to connect to he cluster (that does not exist yet): pulumi:pulumi:Stack (hetzner-k8s-dev):
error: Program failed with an unhandled exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/pulumi/runtime/resource.py", line 1010, in do_rpc_call
return monitor.RegisterResource(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib64/python3.12/site-packages/grpc/_channel.py", line 1160, in __call__
return _end_unary_response_blocking(state, call, False, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib64/python3.12/site-packages/grpc/_channel.py", line 1003, in _end_unary_response_blocking
raise _InactiveRpcError(state) # pytype: disable=not-instantiable
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "configured Kubernetes cluster is unreachable: unable to load Kubernetes client configuration from kubeconfig file. Make sure you have:
• set up the provider as per https://www.pulumi.com/registry/packages/kubernetes/installation-configuration/
invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable"
debug_error_string = "UNKNOWN:Error received from peer {created_time:"2024-05-29T06:06:50.986871168+00:00", grpc_status:2, grpc_message:"configured Kubernetes cluster is unreachable: unable to load Kubernetes client configuration from kubeconfig file. Make sure you have: \n\n \t \xe2\x80\xa2 set up the provider as per https://www.pulumi.com/registry/packages/kubernetes/installation-configuration/ \n\n invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable"}"
>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/pulumi-language-python-exec", line 191, in <module>
loop.run_until_complete(coro)
File "/usr/lib64/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pulumi/runtime/stack.py", line 138, in run_in_stack
await run_pulumi_func(run)
File "/usr/local/lib/python3.12/site-packages/pulumi/runtime/stack.py", line 52, in run_pulumi_func
await wait_for_rpcs()
File "/usr/local/lib/python3.12/site-packages/pulumi/runtime/stack.py", line 114, in wait_for_rpcs
await task
File "/usr/local/lib/python3.12/site-packages/pulumi/runtime/resource.py", line 1015, in do_register
resp = await asyncio.get_event_loop().run_in_executor(None, do_rpc_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pulumi/runtime/resource.py", line 1012, in do_rpc_call
handle_grpc_error(exn)
File "/usr/local/lib/python3.12/site-packages/pulumi/runtime/settings.py", line 307, in handle_grpc_error
raise grpc_error_to_exception(exn)
Exception: configured Kubernetes cluster is unreachable: unable to load Kubernetes client configuration from kubeconfig file. Make sure you have:
• set up the provider as per https://www.pulumi.com/registry/packages/kubernetes/installation-configuration/
invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
|
I did some investigation and, so far, haven't find an ideal solution. When the cluster is unreachable, the At a technical level, we would need to move this check into each component provider's |
I have similar issue. In my case provider is configured that way: kubeconfig = Output.all(resource_group.name, cluster.name).apply(
lambda args: list_managed_cluster_admin_credentials(
resource_group_name=args[0],
resource_name=args[1],
).kubeconfigs[0].value
)
provider = Provider(
name,
kubeconfig=Output.secret(kubeconfig.apply(lambda enc: b64decode(enc).decode()))
) I think it is common case when you want create cluster and install some base components f.e ArgoCD |
I'm getting the exact same issue. Trying to create VPC, Cluster etc and then install ArgoCD.
however I get the same error when trying to deploy...
|
What happened?
Hi,
I would like to use the new
kubernetes.helm.v4.Chart
, to install an helm chart after the cluster creation.But unfortunately if fails on the preview steps, as it expects the cluster to be already available:
Instead the "older" v3 works:
Example
Output of
pulumi about
Additional context
No response
Contributing
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).
The text was updated successfully, but these errors were encountered: