I am trying to setup first master node using K8s 1.10 on RHEL 7.2.
docker is running and no containers are running yet.
etcd is not running either in the system.
#kubeadm init command hangs.
I confirmed that cgroup driver is same as that of Docker 17.06 = systemd.
My system ip address is: 10.12.150.63
kubelet is started and kubelet complains where connection is refused to
10.12.150.63:6443.
cat /etc/hosts
127.0.0.1 localhost
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
cat /etc/resolv.conf
; generated by /usr/sbin/dhclient-script
search domain_bar
I see similar symptoms at
https://github.com/kubernetes/kubeadm/issues/228I already read through below similar issues, but no success with it yet.
https://github.com/kubernetes/kubernetes/issues/57870https://github.com/kubernetes/kubernetes/issues/57709[root@host_foo k8s]# kubeadm init
[init] Using Kubernetes version: v1.10.1
[init] Using Authorization modes: [Node RBAC]
[preflight] Running pre-flight checks.
[WARNING SystemVerification]: docker version is greater than the most recently validated version. Docker version: 17.06.2-ce. Max validated version: 17.03
[WARNING FileExisting-crictl]: crictl not found in system path
Suggestion: go get
github.com/kubernetes-incubator/cri-tools/cmd/crictl[preflight] Starting the kubelet service
[certificates] Generated ca certificate and key.
[certificates] Generated apiserver certificate and key.
[certificates] apiserver serving cert is signed for DNS names [host_foo.domain_bar kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 10.12.150.63]
[certificates] Generated apiserver-kubelet-client certificate and key.
[certificates] Generated etcd/ca certificate and key.
[certificates] Generated etcd/server certificate and key.
[certificates] etcd/server serving cert is signed for DNS names [localhost] and IPs [127.0.0.1]
[certificates] Generated etcd/peer certificate and key.
[certificates] etcd/peer serving cert is signed for DNS names [host_foo.domain_bar] and IPs [10.12.150.63]
[certificates] Generated etcd/healthcheck-client certificate and key.
[certificates] Generated apiserver-etcd-client certificate and key.
[certificates] Generated sa key and public key.
[certificates] Generated front-proxy-ca certificate and key.
[certificates] Generated front-proxy-client certificate and key.
[certificates] Valid certificates and keys now exist in "/etc/kubernetes/pki"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/admin.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/kubelet.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/controller-manager.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/scheduler.conf"
[controlplane] Wrote Static Pod manifest for component kube-apiserver to "/etc/kubernetes/manifests/kube-apiserver.yaml"
[controlplane] Wrote Static Pod manifest for component kube-controller-manager to "/etc/kubernetes/manifests/kube-controller-manager.yaml"
[controlplane] Wrote Static Pod manifest for component kube-scheduler to "/etc/kubernetes/manifests/kube-scheduler.yaml"
[etcd] Wrote Static Pod manifest for a local etcd instance to "/etc/kubernetes/manifests/etcd.yaml"
[init] Waiting for the kubelet to boot up the control plane as Static Pods from directory "/etc/kubernetes/manifests".
[init] This might take a minute or longer if the control plane images have to be pulled.
kubelet logs.
Apr 26 19:46:58 host_foo.domain_bar kubelet[48875]: E0426 19:46:58.991494 48875 reflector.go:205]
k8s.io/kubernetes/pkg/kubelet/kubelet.go:451: Failed to list *v1.Service: Get
https://10.12.150.63:6443/api/v1/services?limit=500&resourceVersion=0: dial tcp
10.12.150.63:6443: getsockopt: connection refused
Apr 26 19:46:58 host_foo.domain_bar kubelet[48875]: E0426 19:46:58.992688 48875 reflector.go:205]
k8s.io/kubernetes/pkg/kubelet/kubelet.go:460: Failed to list *v1.Node: Get
https://10.12.150.63:6443/api/v1/nodes?fieldSelector=metadata.name%3Dhost_foo.domain_bar&limit=500&resourceVersion=0: dial tcp
10.12.150.63:6443: getsockopt: connection refused
Apr 26 19:46:58 host_foo.domain_bar kubelet[48875]: E0426 19:46:58.995643 48875 reflector.go:205]
k8s.io/kubernetes/pkg/kubelet/config/apiserver.go:47: Failed to list *v1.Pod: Get
https://10.12.150.63:6443/api/v1/pods?fieldSelector=spec.nodeName%3Dhost_foo.domain_bar&limit=500&resourceVersion=0: dial tcp
10.12.150.63:6443: getsockopt: connection refused
Apr 26 19:46:59 host_foo.domain_bar kubelet[48875]: I0426 19:46:59.241967 48875 kubelet.go:1794] skipping pod synchronization - [container runtime is down]
Apr 26 19:46:59 host_foo.domain_bar kubelet[48875]: I0426 19:46:59.771528 48875 kubelet_node_status.go:271] Setting node annotation to enable volume controller attach/detach
Apr 26 19:46:59 host_foo.domain_bar kubelet[48875]: I0426 19:46:59.774420 48875 kubelet_node_status.go:82] Attempting to register node host_foo.domain_bar