Nginx ingress install failure


#1

noob to k8s here. so I’ve got a GKE cluster deployed. great! trying to deploy the nginx ingress controller, but keeps failing to start. later learned that I needed to install admission control. I’ve done that but the pod is still not getting a secret mounted. any ideas what else I could be missing?

I’ve confirmed that the pod has the appropriate service account attached.

Here is the error from the deployment log.

W0307 22:31:29.471002 10 client_config.go:548] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.

W0307 22:31:29.471097 10 client_config.go:553] error creating inClusterConfig, falling back to default config: failed to read token file “/var/run/secrets/kubernetes.io/serviceaccount/token”: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory

F0307 22:31:29.471201 10 main.go:248] Error while initiating a connection to the Kubernetes API server. This could mean the cluster is misconfigured (e.g. it has invalid API server certificates or Service Accounts configuration). Reason: invalid configuration: no configuration has been provided


#2

How are you trying to install it, Helm or through the nginx-install guide?


#3

Just following the ningx-install guide.


#4

Had to add the attribute “autoMountServiceAccountToken” to my pod spec. Not sure why it is not auto mounting in this new cluster. It was not an attribute that was set in our older clusters.


#5

Oh wow weird. It would have taken me a while to get to that one. Glad you were able to sort it out :slight_smile:

Was there a podsecuritypolicy in place preventing the automount?