cuddly-dusk-95227
04/14/2021, 11:36 AMpulumi-eks
. what am I missing?billowy-army-68599
cuddly-dusk-95227
04/15/2021, 1:39 AMconst cluster = aws.eks.getCluster({name: "mycluster"})
export const kubeConfig = cluster.then(c => JSON.stringify({
apiVersion: "v1",
clusters: [
{
cluster: {
"certificate-authority-data": c.certificateAuthority.data,
server: c.endpoint,
},
name: "kubernetes",
}
],
contexts: [
{
context: {
cluster: "kubernetes",
user: "aws",
},
name: "aws",
},
],
"current-context": "aws",
kind: "Config",
users: [
{
name: "aws",
user: {
exec: {
apiVersion: "<http://client.authentication.k8s.io/v1alpha1|client.authentication.k8s.io/v1alpha1>",
args: [
"--region",
"us-west-2",
"eks",
"get-token",
"--cluster-name",
c.name,
],
command: "aws",
}
}
},
],
}));
const kubeClient = new k8s.Provider("mycluster", { kubeconfig: kubeConfig })
// do stuff
but it looks goofy 🙂