unable to load schema information from the API server: the server has asked for the client to provide credentials
See original GitHub issueI am getting following error
Previewing update (prod):
Type Name Plan Info
pulumi:pulumi:Stack syngenta-platform-prod 1 error; 18 messages
└─ kubernetes:core:ConfigMap syngenta-platform-nodeAccess 1 error
Diagnostics:
pulumi:pulumi:Stack (syngenta-platform-prod):
Error: invocation of aws:ec2/getSubnet:getSubnet returned an error: grpc: the client connection is closing
at /home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/@pulumi/pulumi/runtime/invoke.js:172:33
at Object.onReceiveStatus (/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/grpc/src/client_interceptors.js:1210:9)
at InterceptingListener._callNext (/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/grpc/src/client_interceptors.js:568:42)
at InterceptingListener.onReceiveStatus (/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/grpc/src/client_interceptors.js:618:8)
at callback (/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/grpc/src/client_interceptors.js:847:24)
Error: invocation of aws:ec2/getSubnet:getSubnet returned an error: grpc: the client connection is closing
at /home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/@pulumi/pulumi/runtime/invoke.js:172:33
at Object.onReceiveStatus (/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/grpc/src/client_interceptors.js:1210:9)
at InterceptingListener._callNext (/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/grpc/src/client_interceptors.js:568:42)
at InterceptingListener.onReceiveStatus (/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/grpc/src/client_interceptors.js:618:8)
at callback (/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/grpc/src/client_interceptors.js:847:24)
Error: invocation of aws:ec2/getSubnet:getSubnet returned an error: grpc: the client connection is closing
at /home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/@pulumi/pulumi/runtime/invoke.js:172:33
at Object.onReceiveStatus (/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/grpc/src/client_interceptors.js:1210:9)
at InterceptingListener._callNext (/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/grpc/src/client_interceptors.js:568:42)
at InterceptingListener.onReceiveStatus (/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/grpc/src/client_interceptors.js:618:8)
at callback (/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/grpc/src/client_interceptors.js:847:24)
error: Running program '/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi' failed with an unhandled exception:
Error: invocation of aws:ec2/getSubnet:getSubnet returned an error: grpc: the client connection is closing
at /home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/@pulumi/pulumi/runtime/invoke.js:172:33
at Object.onReceiveStatus (/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/grpc/src/client_interceptors.js:1210:9)
at InterceptingListener._callNext (/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/grpc/src/client_interceptors.js:568:42)
at InterceptingListener.onReceiveStatus (/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/grpc/src/client_interceptors.js:618:8)
at callback (/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/grpc/src/client_interceptors.js:847:24)
kubernetes:core:ConfigMap (syngenta-platform-nodeAccess):
error: unable to load schema information from the API server: the server has asked for the client to provide credentials
Index.js
const pulumi = require("@pulumi/pulumi");
const aws = require("@pulumi/aws");
const awsx = require("@pulumi/awsx");
const eks = require("@pulumi/eks");
const config = {
vpcName: "syngenta-platform",
clusterName: "syngenta-platform"
};
// Create a VPC for our cluster.
const vpc = new awsx.ec2.Vpc(config.vpcName);
// Create the EKS cluster itself with Fargate enabled.
const cluster = new eks.Cluster(config.clusterName, {
fargate: true,
vpcId: vpc.id,
privateSubnetIds: vpc.privateSubnetIds,
deployDashboard: false
});
// Export the cluster's kubeconfig.
//TODO - make a TypeScript Project
//export const kubeconfig = cluster.kubeconfig;
exports.kubeconfig = cluster.kubeconfig;
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
kubernetes - error: You must be logged in to the server
Running with an IoC tool like Terraform and you failed to pass the ... (the server has asked for the client to provide...
Read more >Resolve the unauthorized server error for the Amazon EKS ...
I'm using kubectl commands to connect to the Amazon Elastic Kubernetes Service (Amazon EKS) API server. I received the message "error: You ...
Read more >Troubleshooting | Google Kubernetes Engine (GKE)
The following error occurs when you try to connect to a GKE cluster using gcloud container clusters get-credentials , but the account doesn't...
Read more >Troubleshooting Guide - Pulumi
This guide covers common troubleshooting techniques when using Pulumi, such as tracing, manually editing deployments, and resolving common errors.
Read more >Chapter 4. The Kubernetes API Server - O'Reilly
attach provides you with the ability to attach a terminal to a running container within a Pod. The exec functionality that allows you...
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

@sylv3r
Looking at this closer, it appears that though the cluster and other resources are created, the dynamicResource (vpc-cni) and the configmap (aws-auth) are not created, as they rely on the cluster’s kubeconfig, which does not factor in the same credentials set in the custom AWS Provider.
We’re looking into a fix for this.
Yes, fargate only works with private subnets:
I think the problem is
I don’t use
defaultaws profile. so I usedpulumi config set aws:profile platformNow that, I removed this config and copied aws creds from
platformprofile to default profile. I can see,├─ kubernetes:core:ServiceAccount syngenta-platform-eks-admin createdright now, I am runningpulumi upand seems like it is working. Will update here again.