Reputation: 75
I've set up a basic GKE cluster using Autopilot settings. I am able to install Helm charts on it using kubectl with proper kubeconfig pointing to the GKE cluster.
I'd like to do the same without the kubeconfig, by providing the cluster details with relevant parameters. To do that I'm running a docker container using alpine/helm image and passing the paramtrised command which looks like this:
docker run --rm -v $(pwd):/chart alpine/helm install <my_chart_name> /chart --kube-apiserver <cluster_endpoint> --kube-ca-file /chart/<cluster_certificate_file> --kube-as-user <my_gke_cluster_username> --kube-token <token>
unfortunately it returns :
Error: INSTALLATION FAILED: Kubernetes cluster unreachable: Get "http://<cluster_endpoint>/version": dial tcp <cluster_endpoint>:80: i/o timeout
Is this even doable with GKE?
Upvotes: 0
Views: 723
Reputation: 75
Problem solved! A more experienced colleague has found the solution.
system:serviceaccount:<namespace>:<service_account>
. However that would not alter the error either.kubectl create rolebinding --clusterrole=cluster-admin --serviceaccount=<namespace>:<service_account>
. Ofc, cluster-admin might now be the role we want to give away freely.Upvotes: 0