https://pulumi.com logo
#general
Title
# general
l

lemon-greece-30910

03/10/2019, 4:50 PM
is anyone able to advise on how the kubernetes dashboard can be created in pulumi? i am able to create a working cluster with the following config, and then i have exported the
kubeconfig
property.
Copy code
const cluster = new eks.Cluster(`${name}-cluster`, {
    vpcId: vpc.vpcId,
    subnetIds: vpc.subnetIds,
    desiredCapacity: 1,
    minSize: 1,
    maxSize: 3,
    // storageClasses: "gp2",
    deployDashboard: true,
})

export const kubeconfig = cluster.kubeconfig
the output gives me the server address in the kubeconfig json structure:
kubeconfig: { clusters: [ { cluster: { server: <servername here> } ] }
... but if i go to the URL, it gives me the following response:
Copy code
{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "forbidden: User \"system:anonymous\" cannot get path \"/\"",
  "reason": "Forbidden",
  "details": {},
  "code": 403
}
can anyone see what i am doing wrong here?
m

most-pager-38056

03/10/2019, 8:11 PM
You can find the instructions to access the dashboard in the source code: https://github.com/pulumi/pulumi-eks/blob/master/nodejs/eks/cluster.ts#L368-L386