Closed pacoxu closed 2 years ago
[root@paco ~]# cat upgrade-v1.24.1.yaml
apiVersion: operator.kubeadm.x-k8s.io/v1alpha1
kind: Operation
metadata:
name: upgrade-v1.24.1
spec:
executionMode: Auto
upgrade:
kubernetesVersion: v1.24.1
local: false
NAME STATUS ROLES AGE VERSION
daocloud Ready <none> 6h19m v1.22.6
paco Ready control-plane,master 6h20m v1.22.6
Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.6", GitCommit:"f59f5c2fda36e4036b49ec027e556a15456108f0", GitTreeState:"clean", BuildDate:"2022-01-19T17:33:06Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.6", GitCommit:"f59f5c2fda36e4036b49ec027e556a15456108f0", GitTreeState:"clean", BuildDate:"2022-01-19T17:26:47Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"linux/amd64"}
Cluster v1.22.6:run the operation
NAME PHASE GROUPS SUCCEEDED FAILED
operation.operator.kubeadm.x-k8s.io/upgrade-v1.24.1 Running 4
NAME PHASE STARTTIME COMMAND COMPLETIONTIME
runtimetask.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.23.0-01-upgrade-apply-paco Running 102s 2/3
NAME PHASE NODES SUCCEEDED FAILED
runtimetaskgroup.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.23.0-01-upgrade-apply Running 1
NAME PHASE GROUPS SUCCEEDED FAILED
operation.operator.kubeadm.x-k8s.io/upgrade-v1.24.1 Running 4 2
NAME PHASE STARTTIME COMMAND COMPLETIONTIME
runtimetask.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.23.0-01-upgrade-apply-paco Succeeded 9m55s 3/3 2m18s
runtimetask.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.23.0-04-upgrade-worker-daocloud Succeeded 2m12s 5/5 0s
runtimetask.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.24.1-01-upgrade-apply-paco Running 1s 1/3
NAME PHASE NODES SUCCEEDED FAILED
runtimetaskgroup.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.23.0-01-upgrade-apply Succeeded 1 1
runtimetaskgroup.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.23.0-04-upgrade-worker Succeeded 1 1
[root@paco ~]# watch ./kubectl get operations,runtimetask,runtimetaskgroup
Every 2.0s: ./kubectl get operations,runtimetask,runtimetaskgroup Thu Jun 16 16:37:09 2022
NAME PHASE GROUPS SUCCEEDED FAILED
operation.operator.kubeadm.x-k8s.io/upgrade-v1.24.1 Running 4 2
NAME PHASE STARTTIME COMMAND COMPLETIONTIME
runtimetask.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.23.0-01-upgrade-apply-paco Succeeded 10m 3/3 3m17s
runtimetask.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.23.0-04-upgrade-worker-daocloud Succeeded 3m11s 5/5 57s
runtimetask.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.24.1-01-upgrade-apply-paco Running 60s 2/3
NAME PHASE NODES SUCCEEDED FAILED
runtimetaskgroup.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.23.0-01-upgrade-apply Succeeded 1 1
runtimetaskgroup.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.23.0-04-upgrade-worker Succeeded 1 1
runtimetaskgroup.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.24.1-01-upgrade-apply Running 1
AME PHASE GROUPS SUCCEEDED FAILED
operation.operator.kubeadm.x-k8s.io/upgrade-v1.24.1 Running 4 3
NAME PHASE STARTTIME COMMAND COMPLETIONTIME
runtimetask.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.23.0-01-upgrade-apply-paco Succeeded 17m 3/3 10m
runtimetask.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.23.0-04-upgrade-worker-daocloud Succeeded 9m57s 5/5 7m43s
runtimetask.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.24.1-01-upgrade-apply-paco Succeeded 7m46s 3/3 31s
runtimetask.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.24.1-04-upgrade-worker-daocloud Running 27s 3/5
NAME PHASE NODES SUCCEEDED FAILED
runtimetaskgroup.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.23.0-01-upgrade-apply Succeeded 1 1
runtimetaskgroup.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.23.0-04-upgrade-worker Succeeded 1 1
runtimetaskgroup.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.24.1-01-upgrade-apply Succeeded 1 1
runtimetaskgroup.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.24.1-04-upgrade-worker Running 1
Finally
NAME PHASE GROUPS SUCCEEDED FAILED
operation.operator.kubeadm.x-k8s.io/upgrade-v1.24.1 Succeeded 4 4
NAME PHASE STARTTIME COMMAND COMPLETIONTIME
runtimetask.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.23.0-01-upgrade-apply-paco Succeeded 20m 3/3 12m
runtimetask.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.23.0-04-upgrade-worker-daocloud Succeeded 12m 5/5 10m
runtimetask.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.24.1-01-upgrade-apply-paco Succeeded 10m 3/3 3m25s
runtimetask.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.24.1-04-upgrade-worker-daocloud Succeeded 3m21s 5/5 55s
NAME PHASE NODES SUCCEEDED FAILED
runtimetaskgroup.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.23.0-01-upgrade-apply Succeeded 1 1
runtimetaskgroup.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.23.0-04-upgrade-worker Succeeded 1 1
runtimetaskgroup.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.24.1-01-upgrade-apply Succeeded 1 1
runtimetaskgroup.operator.kubeadm.x-k8s.io/upgrade-v1.24.1-v1.24.1-04-upgrade-worker Succeeded 1 1
[root@paco ~]# version
Kubernetes v1.24.1
kubeadm version: &version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.1", GitCommit:"3ddd0f45aa91e2f30c70734b175631bec5b5825a", GitTreeState:"clean", BuildDate:"2022-05-24T12:24:38Z", GoVersion:"go1.18.2", Compiler:"gc", Platform:"linux/amd64"}
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short. Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.1", GitCommit:"3ddd0f45aa91e2f30c70734b175631bec5b5825a", GitTreeState:"clean", BuildDate:"2022-05-24T12:26:19Z", GoVersion:"go1.18.2", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.4
Server Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.1", GitCommit:"3ddd0f45aa91e2f30c70734b175631bec5b5825a", GitTreeState:"clean", BuildDate:"2022-05-24T12:18:48Z", GoVersion:"go1.18.2", Compiler:"gc", Platform:"linux/amd64"}
NAME STATUS ROLES AGE VERSION
daocloud Ready <none> 6h36m v1.24.1
paco Ready control-plane 6h37m v1.24.1
[root@paco ~]# alias | grep version
alias version='kubelet --version;kubeadm version; kubectl version; kubectl get node '
Need more tests
Fixes https://github.com/pacoxu/kubeadm-operator/issues/54