nutritious-air-21788
03/20/2024, 8:02 PMProvisioning a New EKS Cluster
steps do not work for me and I’ve now tried multiple languages (and I get the same error). The cluster is provisioned, however the step involving kubeconfig / configmap / vpc-cni fail with errors:
error: configured Kubernetes cluster is unreachable: unable to load schema information from the API server: Get "https://<really-long-amazon-url>": getting credentials: decoding stdout: couldn't get version/kind; json parse error: json: cannot unmarshal string into Go value of type struct ...
It seems that several calls are expecting /openapi/v2
on the control plane to work, but the endpoint is returning forbidden: user 'system:anonymous' cannot get path '/openapi/v2'
I can replicate this in either C# or python using the samples provided in the documentation:
import pulumi
import pulumi_eks as eks
# Create an EKS cluster with the default configuration.
cluster = eks.Cluster("cluster")
# Export the cluster's kubeconfig.
pulumi.export("kubeconfig", cluster.kubeconfig)
or…
using System.Collections.Generic;
using Pulumi;
using Eks = Pulumi.Eks;
return await Deployment.RunAsync(() =>
{
// Create an EKS cluster with the default configuration.
var cluster = new Eks.Cluster("cluster");
return new Dictionary<string, object?>
{
// Export the cluster's kubeconfig.
["kubeconfig"] = cluster.Kubeconfig,
};
});
I think I am probably missing something really obvious. Does anyone have any ideas?stale-twilight-75626
03/20/2024, 9:26 PMstale-twilight-75626
03/20/2024, 9:27 PMnutritious-air-21788
03/20/2024, 10:04 PMaws eks update-kubeconfig
and returning it as the outputnutritious-air-21788
03/23/2024, 2:55 AMProviderCredentialOpts
as a workaround and same error.billions-river-87988
03/25/2024, 4:47 PMaws eks update-kubeconfig --name myclustername
on the CLI with whatever creds you have for AWS ( profile, env, or SSO)- does this command work?nutritious-air-21788
03/25/2024, 5:07 PMnutritious-air-21788
03/25/2024, 5:09 PMpulumi up
again, I get a slightly different error (configured Kubernetes cluster is unreachable: unable to load schema information from the API server: the server has asked the client to provide credentials
)nutritious-air-21788
03/25/2024, 5:23 PM