<h2>k8s controller manager cannot start (solved by changing AWS EC2 tag)</h2>

<p>I have similar issue as this post: <a href="https://stackoverflow.com/questions/50668070/kube-controller-manager-dont-start-when-using-cloud-provider-aws-with-kubeadm/50682359#comment89330353_50682359">kube-controller-manager don't start when using “cloud-provider=aws” with kubeadm</a>, but that does not provide any solution to solve the issue. Below is the log stats from <strong>kubernetes controller manager</strong>.</p>

<pre><code>I0705 17:59:05.941049       1 controllermanager.go:116] Version: v1.10.3
W0705 17:59:05.941983       1 authentication.go:55] Authentication is disabled
I0705 17:59:05.942004       1 insecure_serving.go:44] Serving insecurely on 127.0.0.1:10252
I0705 17:59:05.942450       1 leaderelection.go:175] attempting to acquire leader lease  kube-system/kube-controller-manager...
I0705 17:59:22.823671       1 leaderelection.go:184] successfully acquired lease kube-system/kube-controller-manager
I0705 17:59:22.823945       1 event.go:218] Event(v1.ObjectReference{Kind:"Endpoints", Namespace:"kube-system", Name:"kube-controller-manager", UID:"ec7f1208-807c-11e8-bc66-0e594759e784", APIVersion:"v1", ResourceVersion:"289", FieldPath:""}): type: 'Normal' reason: 'LeaderElection' k8s_1bbcc7bc-807d-11e8-859d-0e594759e784 became leader
I0705 17:59:22.849017       1 aws.go:1026] Building AWS cloudprovider
I0705 17:59:22.849064       1 aws.go:988] Zone not specified in configuration file; querying AWS metadata service
F0705 17:59:22.851606       1 controllermanager.go:159] error building controller context: cloud provider could not be initialized: could not init cloud provider "aws": error finding instance i-07df027cffda674bc: "error listing AWS instances: \"NoCredentialProviders: no valid providers in chain. Deprecated.\\n\\tFor verbose messaging see aws.Config.CredentialsChainVerboseErrors\""
</code></pre>

<p>The <code>/etc/kubernetes/aws.conf</code> file.</p>

<pre><code>apiVersion: kubeadm.k8s.io/v1alpha1
kind: MasterConfiguration
cloudProvider: aws
kubernetesVersion: 1.10.3
</code></pre>

<p>The <code>/etc/kubernetes/cloud-config.conf</code> file.</p>

<pre><code>[Global]
KubernetesClusterTag=k8s
KubernetesClusterID=k8s
</code></pre>

<h2>Solution</h2>

<p>Change <strong>EC2</strong> instance tag, KEY=<strong>KubernetesCluster</strong>, VALUE=<strong>k8s</strong>(in my case).</p>

jiashenC
<h2>kube-dns is always pending because of weave net crash</h2>

<p>Fix <code>cgroups</code> setting.</p>

<ul>
<li>Add <code>Environment="KUBELET_CGROUP_ARGS=--cgroup-driver=cgroupfs"</code> to <code>/etc/systemd/system/kubelet.service.d/10-kubeadm.conf</code>.</li>
<li>Restart <strong>kubelet</strong> service.

<pre><code>sudo systemctl deamon-reload
sudo systemctl restart kubelet
</code></pre></li>
</ul>

<p>Install weave net and launch before creating <strong>kubernetes</strong> cluster. </p>
