Cluster information:
Kubernetes version: 1.26.3
Installation method: yum
Host OS: azure vm RHEL 9.0
hostname for host: vm-rhel9-ctrl
Nodes workers:azure vm RHEL 8.7
container runtime: containerd with CRI v1 from docker repository
containerd version: 1.6.19
Hello,
I initialized my cluster using kubeadm on my vm RHEL9, but no resources in any namespaces.
I copied /etc/kubernetes/admin.conf to ~/.kube/config
I restarted kubelet on the main server but nothing.
In the kubelet logs on the main server
Apr 13 13:42:45 vm-rhel9-ctrl kubelet[44618]: E0413 13:42:45.565173 44618 event.go:267] Server rejected event '&v1.Event{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"kube-controller-manager-vm-rhel9-ctrl.17558226cbbe6982", GenerateName:"", Namespace:"kube-system", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), DeletionTimestamp:<nil>, DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ManagedFields:[]v1.ManagedFieldsEntry(nil)}, InvolvedObject:v1.ObjectReference{Kind:"Pod", Namespace:"kube-system", Name:"kube-controller-manager-vm-rhel9-ctrl", UID:"4eb5babdb7b44bc10161e9604587a236", APIVersion:"v1", ResourceVersion:"", FieldPath:"spec.containers{kube-controller-manager}"}, Reason:"Started", Message:"Started container kube-controller-manager", Source:v1.EventSource{Component:"kubelet", Host:"vm-rhel9-ctrl"}, FirstTimestamp:time.Date(2023, time.April, 13, 13, 38, 59, 31370114, time.Local), LastTimestamp:time.Date(2023, time.April, 13, 13, 42, 45, 563892845, time.Local), Count:3, Type:"Normal", EventTime:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), Series:(*v1.EventSeries)(nil), Action:"", Related:(*v1.ObjectReference)(nil), ReportingController:"", ReportingInstance:""}': 'Unauthorized' (will not retry!)
Apr 13 13:42:45 vm-rhel9-ctrl kubelet[44618]: I0413 13:42:45.987564 44618 status_manager.go:698] "Failed to get status for pod" podUID=4eb5babdb7b44bc10161e9604587a236 pod="kube-system/kube-controller-manager-vm-rhel9-ctrl" err="Unauthorized"
Apr 13 13:42:47 vm-rhel9-ctrl kubelet[44618]: E0413 13:42:47.427413 44618 eviction_manager.go:261] "Eviction manager: failed to get summary stats" err="failed to get node info: node \"vm-rhel9-ctrl\" not found"
Apr 13 13:42:48 vm-rhel9-ctrl kubelet[44618]: E0413 13:42:48.352931 44618 controller.go:146] failed to ensure lease exists, will retry in 7s, error: Unauthorized
Apr 13 13:42:48 vm-rhel9-ctrl kubelet[44618]: I0413 13:42:48.382124 44618 kubelet_node_status.go:70] "Attempting to register node" node="vm-rhel9-ctrl"
Apr 13 13:42:48 vm-rhel9-ctrl kubelet[44618]: E0413 13:42:48.383046 44618 kubelet_node_status.go:92] "Unable to register node with API server" err="Unauthorized" node="vm-rhel9-ctrl"
Apr 13 13:42:48 vm-rhel9-ctrl kubelet[44618]: I0413 13:42:48.587414 44618 status_manager.go:698] "Failed to get status for pod" podUID=180987db31a81116b1f04bb351b5f0f2 pod="kube-system/etcd-vm-rhel9-ctrl" err="Unauthorized"
Apr 13 13:42:48 vm-rhel9-ctrl kubelet[44618]: I0413 13:42:48.588282 44618 status_manager.go:698] "Failed to get status for pod" podUID=180987db31a81116b1f04bb351b5f0f2 pod="kube-system/etcd-vm-rhel9-ctrl" err="Unauthorized"
Apr 13 13:42:49 vm-rhel9-ctrl kubelet[44618]: I0413 13:42:49.155390 44618 status_manager.go:698] "Failed to get status for pod" podUID=11ee47626033babc65a49546790f0850 pod="kube-system/kube-apiserver-vm-rhel9-ctrl" err="Unauthorized"
Apr 13 13:42:51 vm-rhel9-ctrl kubelet[44618]: I0413 13:42:51.443203 44618 scope.go:115] "RemoveContainer" containerID="ce77ab1a0da002e9c8bcdf5098432e6317249cf35326db312c91f6e95af89f5f"
Apr 13 13:42:51 vm-rhel9-ctrl kubelet[44618]: E0413 13:42:51.443470 44618 pod_workers.go:965] "Error syncing pod, skipping" err="failed to \"StartContainer\" for \"kube-scheduler\" with CrashLoopBackOff: \"back-off 40s restarting failed container=kube-scheduler pod=kube-scheduler-vm-rhel9-ctrl_kube-system(3048d1560c39905eea157568f5db0acd)\"" pod="kube-system/kube-scheduler-vm-rhel9-ctrl" podUID=3048d1560c39905eea157568f5db0acd
Port 6443 is opened.
sudo netstat -tulpn | grep 6443
tcp6 0 0 :::6443 :::* LISTEN 48043/kube-apiserve
Thank’s for helping