aws-iam-authenticator: Bad certificate error
Kubernetes Version: 1.8.4
I’m attempting to give this a try in a testing cluster I’ve spun up with kops 1.8.0. I think I’m quite close, but it looks like I’ve got a certificate problem somewhere. When attempting to do the following, I get a few errors:
kubectl --kubeconfig=/path/to/my/kubeconfig --token="$(heptio-authenticator-aws token -i mycluster.local)" get nodes
The first is immediate on my local workstation:
error: You must be logged in to the server (Unauthorized)
The second is from the container itself:
time="2017-12-05T20:14:47Z" level=info msg="http: TLS handshake error from 127.0.0.1:41980: remote error: tls: bad certificate" http=error
I’m assuming I have the wrong certificate configured somewhere, but from the docs it is not clear where that might be. Does the authenticator need to use the cluster certificates (in this case generated by kops) or are the certs it generates on its own correct?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 24 (9 by maintainers)
I get the following error:
running aws-iam-authenticator
gcr.io/heptio-images/authenticator:v0.3.0with kops v1.11.0 and k8s 1.11.5The cohesive list to get the authenticator working for a kops cluster (or any cluster) should go as follows - https://github.com/heptio/authenticator#kops-usage which includes #3 that says “If the cluster already exists, roll the cluster with
kops rolling-update cluster ${CLUSTER_NAME}in order to recreate the master nodes.”@Raffo , this sounds like the masters don’t have the certs when it boots thus it’s creating those when you apply the daemonset which wouldn’t have been loaded into the
apiserveryet,Here are the steps that I just took and it worked without restarting… Please tell me if you are doing something different. I think step 6 and 9 are what is missing, but that’s just a hunch.
export CLUSTER_NAME=auth.debug.weave.k8s.localkops create cluster ${CLUSTER_NAME} --zones us-west-1a --networking weavekops edit cluster ${CLUSTER_NAME}.spec${KOPS_STATE_STORE}and${CLUSTER_NAME}kops update cluster ${CLUSTER_NAME} --yeswatch kops validate clusteruntil successexample.yamland make sure to set the cluster name and some rolekubectl apply -f example.yamlkubectl logs -f -n kube-system [authenticator POD]in a new terminal windowuserinkubeconfigwith:kubectl get nodesand watch the log output.