-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[k8s cluster convert to openyurt fail] #572
Comments
If convert/revert job failed, we don't delete the convert/revert job and user should delete convert/revert job manually. |
I do as you say, but i seems still some problems, such as job timeout and yurthub pod seems not created [root@k8s-node1 bin]# ./yurtctl convert -c k8s-node1 -p kubeadm
I1110 19:57:33.547551 2811 convert.go:318] mark k8s-node1 as the cloud-node
I1110 19:58:23.642373 2811 util.go:540] servant job(yurtctl-disable-node-controller-k8s-node1) has succeeded
I1110 19:58:23.642422 2811 convert.go:343] complete disabling node-controller
I1110 19:58:23.651814 2811 convert.go:443] kube-public/cluster-info configmap already exists, skip to prepare it
I1110 19:58:23.677696 2811 convert.go:408] deploying the yurt-hub and resetting the kubelet service on edge nodes...
E1110 20:00:23.682522 2811 util.go:537] **fail to run servant job(yurtctl-servant-convert-k8s-node2): wait for job to be complete timeout**
I1110 20:00:23.682720 2811 convert.go:414] complete deploying yurt-hub on edge nodes
I1110 20:00:23.682740 2811 convert.go:417] deploying the yurt-hub and resetting the kubelet service on cloud nodes
E1110 20:02:23.693251 2811 util.go:537] **fail to run servant job(yurtctl-servant-convert-k8s-node1): wait for job to be complete timeout**
I1110 20:02:23.693412 2811 convert.go:423] complete deploying yurt-hub on cloud nodes use kube-system calico-kube-controllers-659bd7879c-pxppj 1/1 Running 1 2d
kube-system calico-node-p6mcn 1/1 Running 1 2d
kube-system calico-node-tzqnl 1/1 Running 0 2d
kube-system coredns-5897cd56c4-8pb5p 1/1 Running 0 2d5h
kube-system coredns-5897cd56c4-tvm4n 1/1 Running 0 2d5h
kube-system etcd-k8s-node1 1/1 Running 1 2d5h
kube-system kube-apiserver-k8s-node1 1/1 Running 1 2d5h
kube-system kube-controller-manager-k8s-node1 1/1 Running 0 12m
kube-system kube-proxy-h2lfs 1/1 Running 1 46h
kube-system kube-proxy-rzfc2 1/1 Running 0 46h
kube-system kube-scheduler-k8s-node1 1/1 Running 1 2d5h
kube-system yurt-controller-manager-77b97fd47b-p2fmd 1/1 Running 0 12m use [root@k8s-node1 bin]# kubectl describe node k8s-node1 | grep Labels
Labels: beta.kubernetes.io/arch=amd64
[root@k8s-node1 bin]# kubectl describe node k8s-node2 | grep Labels
Labels: beta.kubernetes.io/arch=amd64 I am sure my k8s cluster work fine, how to solve this problem? |
Can you get the log of convert job? |
Job log just as follow. [root@k8s-node1 pod]# kubectl describe job yurtctl-servant-convert-k8s-node2 -n kube-system
Name: yurtctl-servant-convert-k8s-node2
Namespace: kube-system
Selector: controller-uid=1fa2ddf4-edec-4567-9189-3bced626ad46
Labels: controller-uid=1fa2ddf4-edec-4567-9189-3bced626ad46
job-name=yurtctl-servant-convert-k8s-node2
Annotations: <none>
Parallelism: 1
Completions: 1
Start Time: Wed, 10 Nov 2021 19:58:23 +0800
Pods Statuses: 0 Running / 0 Succeeded / 1 Failed
Pod Template:
Labels: controller-uid=1fa2ddf4-edec-4567-9189-3bced626ad46
job-name=yurtctl-servant-convert-k8s-node2
Containers:
yurtctl-servant:
Image: openyurt/yurtctl-servant:latest
Port: <none>
Host Port: <none>
Command:
/bin/sh
-c
Args:
cp /usr/local/bin/yurtctl /tmp && nsenter -t 1 -m -u -n -i -- /var/tmp/yurtctl convert edgenode --yurthub-image openyurt/yurthub:latest --join-token p3gb13.4b59h9emaxaofz7x && rm /tmp/yurtctl
Environment:
NODE_NAME: (v1:spec.nodeName)
KUBELET_SVC: /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
Mounts:
/tmp from host-var-tmp (rw)
Volumes:
host-var-tmp:
Type: HostPath (bare host directory volume)
Path: /var/tmp
HostPathType: Directory
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal SuccessfulCreate 26m job-controller Created pod: yurtctl-servant-convert-k8s-node2-pzj77
Normal SuccessfulDelete 21m job-controller Deleted pod: yurtctl-servant-convert-k8s-node2-pzj77
Warning BackoffLimitExceeded 21m job-controller Job has reached the specified backoff limit |
There is little information because the pod |
[root@k8s-node1 bin]# kubectl logs -n kube-system yurtctl-servant-convert-k8s-node2-4j647
F1111 09:42:50.795808 20927 edgenode.go:50] fail to convert the kubernetes node to a yurt node: stat **/etc/systemd/system/kubelet.service.d/10-kubeadm.conf: no such file or directory**
[root@k8s-node1 system]# systemctl status kubelet
● kubelet.service - kubelet: The Kubernetes Node Agent
Loaded: loaded (/usr/lib/systemd/system/kubelet.service; enabled; vendor preset: disabled)
Drop-In: **/usr/lib/systemd/system/kubelet.service.d**
└─10-kubeadm.conf
Active: active (running) since Wed 2021-11-10 22:53:50 CST; 10h ago
Docs: https://kubernetes.io/docs/
Main PID: 797 (kubelet)
Tasks: 17
Memory: 132.9M
CGroup: /system.slice/kubelet.service
└─797 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --config=/var/lib/kubelet/config.yaml --network-plugin=cni --pod-infra-container-image=registry.cn-hangzhou.aliyuncs.com/lfy_k8s_... It seems that the kubelet config file not found, but i just use kubeadm to create the k8s cluster, i try use |
Yes, the failure occurs because the kubelet config file path doesn't found. You should add the parameter |
yes! converted to openyurt successfully, thanks. |
What happened:
I have a k8s cluster 1 node and 1 slave, when i use
yurtctl convert -c master -p kubeadm
and i got some info as followwhen i use
kubectl get pod -A -o wide |grep master|grep yurt
to check i got:It seems not converted k8s to openyurt
I use
yurtctl revert
and retry, but it seem env not cleaned, i got the follow info.what can i do?
The text was updated successfully, but these errors were encountered: