Wind River Support Network

HomeDefectsLINCD-9233
Fixed

LINCD-9233 : kubernetes: k8s init failed

Created: May 11, 2022    Updated: Feb 27, 2023
Resolved Date: Feb 25, 2023
Found In Version: 10.22.21.0
Fix Version: 10.23.9.0
Severity: Standard
Applicable for: Wind River Linux CD
Component/s: Userspace

Description

~# cat /proc/version
Linux version 5.15.38-yocto-standard (oe-user@oe-host) (x86_64-wrs-linux-gcc (GCC) 11.3.0, GNU ld (GNU Binutils) 2.38.20220313) #1 SMP PREEMPT Mon May 9 20:30:32 UTC 2022
~# rpm -qa | grep kubernetes
kubernetes-1.22.1-r0.corei7_64
~#

~# kubeadm init --apiserver-advertise-address 128.224.165.208 --pod-network-cidr=10.244.0.0/16  --v=5       
I0511 08:37:12.908007   15939 initconfiguration.go:116] detected and using CRI socket: /var/run/dockershim.sock
I0511 08:37:12.908129   15939 kubelet.go:203] the value of KubeletConfiguration.cgroupDriver is empty; setting it to "systemd"
I0511 08:37:12.917311   15939 version.go:186] fetching Kubernetes version from URL: https://dl.k8s.io/release/stable-1.txt
I0511 08:37:14.354829   15939 version.go:255] remote version is much newer: v1.24.0; falling back to: stable-1.22
I0511 08:37:14.354896   15939 version.go:186] fetching Kubernetes version from URL: https://dl.k8s.io/release/stable-1.22.txt
[init] Using Kubernetes version: v1.22.9
[preflight] Running pre-flight checks
I0511 08:37:15.269540   15939 checks.go:577] validating Kubernetes and kubeadm version
I0511 08:37:15.269594   15939 checks.go:170] validating if the firewall is enabled and active
I0511 08:37:15.290064   15939 checks.go:205] validating availability of port 6443
I0511 08:37:15.290335   15939 checks.go:205] validating availability of port 10259
I0511 08:37:15.290407   15939 checks.go:205] validating availability of port 10257
I0511 08:37:15.290470   15939 checks.go:282] validating the existence of file /etc/kubernetes/manifests/kube-apiserver.yaml
I0511 08:37:15.290498   15939 checks.go:282] validating the existence of file /etc/kubernetes/manifests/kube-controller-manager.yaml
I0511 08:37:15.290518   15939 checks.go:282] validating the existence of file /etc/kubernetes/manifests/kube-scheduler.yaml
I0511 08:37:15.290544   15939 checks.go:282] validating the existence of file /etc/kubernetes/manifests/etcd.yaml
I0511 08:37:15.290575   15939 checks.go:432] validating if the connectivity type is via proxy or direct
I0511 08:37:15.290608   15939 checks.go:471] validating http connectivity to first IP address in the CIDR
I0511 08:37:15.290664   15939 checks.go:471] validating http connectivity to first IP address in the CIDR
I0511 08:37:15.290715   15939 checks.go:106] validating the container runtime
I0511 08:37:15.339426   15939 checks.go:132] validating if the "docker" service is enabled and active
I0511 08:37:15.372020   15939 checks.go:331] validating the contents of file /proc/sys/net/bridge/bridge-nf-call-iptables
I0511 08:37:15.372109   15939 checks.go:331] validating the contents of file /proc/sys/net/ipv4/ip_forward
I0511 08:37:15.372164   15939 checks.go:649] validating whether swap is enabled or not
I0511 08:37:15.372234   15939 checks.go:372] validating the presence of executable conntrack
I0511 08:37:15.372277   15939 checks.go:372] validating the presence of executable ip
I0511 08:37:15.372325   15939 checks.go:372] validating the presence of executable iptables
I0511 08:37:15.372363   15939 checks.go:372] validating the presence of executable mount
I0511 08:37:15.372401   15939 checks.go:372] validating the presence of executable nsenter
I0511 08:37:15.372430   15939 checks.go:372] validating the presence of executable ebtables
I0511 08:37:15.372477   15939 checks.go:372] validating the presence of executable ethtool
I0511 08:37:15.372520   15939 checks.go:372] validating the presence of executable socat
I0511 08:37:15.372552   15939 checks.go:372] validating the presence of executable tc
I0511 08:37:15.372594   15939 checks.go:372] validating the presence of executable touch
I0511 08:37:15.372622   15939 checks.go:520] running all checks
I0511 08:37:15.439147   15939 checks.go:403] checking whether the given node name is valid and reachable using net.LookupHost
I0511 08:37:15.439194   15939 checks.go:618] validating kubelet version
I0511 08:37:15.536751   15939 checks.go:132] validating if the "kubelet" service is enabled and active
I0511 08:37:15.559153   15939 checks.go:205] validating availability of port 10250
I0511 08:37:15.559276   15939 checks.go:205] validating availability of port 2379
I0511 08:37:15.559344   15939 checks.go:205] validating availability of port 2380
I0511 08:37:15.559409   15939 checks.go:245] validating the existence and emptiness of directory /var/lib/etcd
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
I0511 08:37:15.559552   15939 checks.go:838] using image pull policy: IfNotPresent
I0511 08:37:15.599691   15939 checks.go:847] image exists: k8s.gcr.io/kube-apiserver:v1.22.9
I0511 08:37:15.642158   15939 checks.go:847] image exists: k8s.gcr.io/kube-controller-manager:v1.22.9
I0511 08:37:15.684451   15939 checks.go:847] image exists: k8s.gcr.io/kube-scheduler:v1.22.9
I0511 08:37:15.727111   15939 checks.go:847] image exists: k8s.gcr.io/kube-proxy:v1.22.9
I0511 08:37:15.770010   15939 checks.go:847] image exists: k8s.gcr.io/pause:3.5
I0511 08:37:15.815609   15939 checks.go:847] image exists: k8s.gcr.io/etcd:3.5.0-0
I0511 08:37:15.859963   15939 checks.go:847] image exists: k8s.gcr.io/coredns/coredns:v1.8.4
[certs] Using certificateDir folder "/etc/kubernetes/pki"
I0511 08:37:15.860068   15939 certs.go:111] creating a new certificate authority for ca
[certs] Generating "ca" certificate and key
I0511 08:37:16.475880   15939 certs.go:487] validating certificate period for ca certificate
[certs] Generating "apiserver" certificate and key
[certs] apiserver serving cert is signed for DNS names [intel-x86-64 kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 128.224.165.208]
[certs] Generating "apiserver-kubelet-client" certificate and key
I0511 08:37:17.689756   15939 certs.go:111] creating a new certificate authority for front-proxy-ca
[certs] Generating "front-proxy-ca" certificate and key
I0511 08:37:17.930698   15939 certs.go:487] validating certificate period for front-proxy-ca certificate
[certs] Generating "front-proxy-client" certificate and key
I0511 08:37:18.101404   15939 certs.go:111] creating a new certificate authority for etcd-ca
[certs] Generating "etcd/ca" certificate and key
I0511 08:37:19.103025   15939 certs.go:487] validating certificate period for etcd/ca certificate
[certs] Generating "etcd/server" certificate and key
[certs] etcd/server serving cert is signed for DNS names [intel-x86-64 localhost] and IPs [128.224.165.208 127.0.0.1 ::1]
[certs] Generating "etcd/peer" certificate and key
[certs] etcd/peer serving cert is signed for DNS names [intel-x86-64 localhost] and IPs [128.224.165.208 127.0.0.1 ::1]
[certs] Generating "etcd/healthcheck-client" certificate and key
[certs] Generating "apiserver-etcd-client" certificate and key
I0511 08:37:20.876799   15939 certs.go:77] creating new public/private key files for signing service account users
[certs] Generating "sa" key and public key
[kubeconfig] Using kubeconfig folder "/etc/kubernetes"
I0511 08:37:21.560292   15939 kubeconfig.go:103] creating kubeconfig file for admin.conf
[kubeconfig] Writing "admin.conf" kubeconfig file
I0511 08:37:22.473090   15939 kubeconfig.go:103] creating kubeconfig file for kubelet.conf
[kubeconfig] Writing "kubelet.conf" kubeconfig file
I0511 08:37:22.657747   15939 kubeconfig.go:103] creating kubeconfig file for controller-manager.conf
[kubeconfig] Writing "controller-manager.conf" kubeconfig file
I0511 08:37:22.893748   15939 kubeconfig.go:103] creating kubeconfig file for scheduler.conf
[kubeconfig] Writing "scheduler.conf" kubeconfig file
I0511 08:37:23.362067   15939 kubelet.go:65] Stopping the kubelet
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x74d0aa]

Steps to Reproduce

1) setup.sh
 --machine intel-x86-64 --dl-layers --distro wrlinux --templates feature/kubernetes --dl-layers
 
2). ./environment-setup-x86_64-wrlinuxsdk-linux
  . ./oe-init-build-env build_test
  
3) bitbake wrlinux-image-std

4) boot the target and run commands per problem description
Live chat
Online