Why Provision ec2 need add `extra_args` -> `cloud-config` for kubelet manually


#1

If not, I could find logs of kubelet: --cloud-config="" and NoCredentialProviders: no valid providers in chain

But I still set aws key secret and iam instance profile in Node Template. It seems like not work.
The cloud-config file I set manually is like:

[Global]
VPC=vpc-1e067f7
SubnetID=subnet-4367640
RoleARN=arn:aws:iam::61679929213:role/rancher
Zone=ap-northeast-1b
KubernetesClusterTag=kubernetes
KubernetesClusterID=kubernetes

#2

And that the provision module (https://github.com/kubernetes/cloud-provider-aws) will rename my host of master and worker node.
Both of them will change to “master-dummy”.

It caused kube-control-manager saw them as single node.

kubectl get nodes
NAME STATUS ROLES AGE VERSION
master-dummy Ready controlplane,etcd,worker 14h v1.11.3