Open wiquan opened 5 years ago
I dont know if this is correct or not, but it works-for-me.
My problem was that I was updating the hostname after the cluster was created. By doing that, it's like the master didn't know it was the master.
I am still running:
sudo hostname $(curl 169.254.169.254/latest/meta-data/hostname)
but now I run it before the cluster initialization
What steps did you take and what happened: fails to create using QS(5042) Kubernetes AWS CloudFormation Template: Create a Kubernetes.
I used this template https://aws-quickstart.s3.amazonaws.com/quickstart-heptio/templates/kubernetes-cluster.template
to create a stack with 'rollbackOnFail=false' so i can do a post-mortem, then ssh over to the broken master.
I think 'kubeadm init' is failing because the infamous log: forbidden: node "ip-10-126-121-125" cannot modify node "ip-10-126-121-125.ec2.internal"
From what I dug up, this seems like an old issue. I'm not sure why its still presenting when using these cloudFormation templates. In fact , I would like to know if there is any version of this template that is known to work. I can rollback and try a working one.
What did you expect to happen: I was hoping this quickstart would build a working cluster.
Anything else you would like to add: /etc/hosts is missing the line for the internal ip (10.x.x.x) and hostname (ip-10-x-x-x) so 'hostname --fqdn' is only returning the short hostname.
Environment:
Kubernetes version: (use
kubectl version
): kubeadm version: &version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.2", GitCommit:"bb9ffb1654d4a729bb4cec18ff088eacc153c239", GitTreeState:"clean", BuildDate:"2018-08-07T23:14:39Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}OS (e.g. from
/etc/os-release
): Ubuntu 16.04.5 LTS