<p>I run the kube-apiserver with my self-signed certificate:</p>

<pre><code>/opt/bin/kube-apiserver \
--etcd_servers=http://master:2379,http://slave1:2379,http://slave2:2379 \
--logtostderr=false \
--v=4 \
--client-ca-file=/home/kubernetes/ssl/ca.crt \
--service-cluster-ip-range=192.168.3.0/24 \
--tls-cert-file=/home/kubernetes/ssl/server.crt \
--tls-private-key-file=/home/kubernetes/ssl/server.key
</code></pre>

<p>Then I run the kubelet with the kubeconfig:</p>

<pre><code>/opt/bin/kubelet \
--address=0.0.0.0 \
--port=10250 \
--api_servers=https://master:6443 \
--kubeconfig=/home/kubernetes/ssl/config.yaml \
--logtostderr=false \
--v=4
</code></pre>

<p>The content of the config.yaml is below:</p>

<pre><code>apiVersion: v1
kind: Config
clusters:
- name: ubuntu
  cluster:
    insecure-skip-tls-verify: true
    server: https://master:6443
contexts:
- context:
    cluster: "ubuntu"
    user: "ubuntu"
  name: development
current-context: development
users:
- name: ubuntu
  user:
    client-certificate: /home/kubernetes/ssl/ca.crt
    client-key: /home/kubernetes/ssl/ca.key
</code></pre>

<p>So, I thought the kubelet will not verify the self-signed certificate of apiserver, but the logs showed:</p>

<pre><code>E1009 16:48:51.919749  100724 reflector.go:136] Failed to list *api.Pod: Get https://master:6443/api/v1/pods?fieldSelector=spec.nodeName%3Dslave1: x509: certificate signed by unknown authority
E1009 16:48:51.919876  100724 reflector.go:136] Failed to list *api.Node: Get https://master:6443/api/v1/nodes?fieldSelector=metadata.name%3Dslave1: x509: certificate signed by unknown authority
E1009 16:48:51.923153  100724 reflector.go:136] Failed to list *api.Service: Get https://master:6443/api/v1/services: x509: certificate signed by unknown authority
E1009 16:48:52.821556  100724 event.go:194] Unable to write event: 'Post https://master:6443/api/v1/namespaces/default/events: x509: certificate signed by unknown authority' (may retry after sleeping)
E1009 16:48:52.922414  100724 reflector.go:136] Failed to list *api.Node: Get https://master:6443/api/v1/nodes?fieldSelector=metadata.name%3Dslave1: x509: certificate signed by unknown authority
E1009 16:48:52.922433  100724 reflector.go:136] Failed to list *api.Pod: Get https://master:6443/api/v1/pods?fieldSelector=spec.nodeName%3Dslave1: x509: certificate signed by unknown authority
E1009 16:48:52.924432  100724 reflector.go:136] Failed to list *api.Service: Get https://master:6443/api/v1/services: x509: certificate signed by unknown authority
</code></pre>

<p>So I am confused with the meaning of the <code>insecure-skip-tls-verify</code>...</p>

<p>TL;DR. You can comment out  &quot;certificate-authority-data:&quot; key to get it working.</p>
<hr />
<p>More info</p>
<p>There is an open issue (<a href="https://github.com/kubernetes/kubernetes/issues/13830" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/13830</a>) with the behavior of that flag when a client cert/key is provided. When a client certificate is provided, the insecure flag is ignored.</p>
