Skip to content

Instantly share code, notes, and snippets.

@Cloud-Mak
Last active June 23, 2023 15:14
Show Gist options
  • Save Cloud-Mak/9139dff44f72e7b819b691fe99f40567 to your computer and use it in GitHub Desktop.
Save Cloud-Mak/9139dff44f72e7b819b691fe99f40567 to your computer and use it in GitHub Desktop.
kubctl - temp
root@stage-mast1:/# kubeadm certs check-expiration
[check-expiration] Reading configuration from the cluster...
[check-expiration] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
W0623 15:09:12.445876 129959 initconfiguration.go:120] Usage of CRI endpoints without URL scheme is deprecated and can cause kubelet errors in the future. Automatically prepending scheme "unix" to the "criSocket" with value "/run/containerd/containerd.sock". Please update your configuration!
CERTIFICATE EXPIRES RESIDUAL TIME CERTIFICATE AUTHORITY EXTERNALLY MANAGED
admin.conf Jul 18, 2023 09:52 UTC 24d ca no
apiserver Jul 18, 2023 09:52 UTC 24d ca no
apiserver-etcd-client Jul 18, 2023 09:52 UTC 24d etcd-ca no
apiserver-kubelet-client Jul 18, 2023 09:52 UTC 24d ca no
controller-manager.conf Jul 18, 2023 09:52 UTC 24d ca no
etcd-healthcheck-client Jul 18, 2023 09:52 UTC 24d etcd-ca no
etcd-peer Jul 18, 2023 09:52 UTC 24d etcd-ca no
etcd-server Jul 18, 2023 09:52 UTC 24d etcd-ca no
front-proxy-client Jul 18, 2023 09:52 UTC 24d front-proxy-ca no
scheduler.conf Jul 18, 2023 09:52 UTC 24d ca no
CERTIFICATE AUTHORITY EXPIRES RESIDUAL TIME EXTERNALLY MANAGED
ca Jul 15, 2032 09:20 UTC 9y no
etcd-ca Jul 15, 2032 09:20 UTC 9y no
front-proxy-ca Jul 15, 2032 09:20 UTC 9y no
root@stage-mast1:/# kubectl version
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.8", GitCommit:"a12b886b1da059e0190c54d09c5eab5219dd7acf", GitTreeState:"clean", BuildDate:"2022-06-16T05:57:43Z", GoVersion:"go1.17.11", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.9", GitCommit:"c1de2d70269039fe55efb98e737d9a29f9155246", GitTreeState:"clean", BuildDate:"2022-07-13T14:19:57Z", GoVersion:"go1.17.11", Compiler:"gc", Platform:"linux/amd64"}
root@stage-mast1:/# kubeadm upgrade plan
[upgrade/config] Making sure the configuration is correct:
[upgrade/config] Reading configuration from the cluster...
[upgrade/config] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
W0623 15:10:34.400031 130510 initconfiguration.go:120] Usage of CRI endpoints without URL scheme is deprecated and can cause kubelet errors in the future. Automatically prepending scheme "unix" to the "criSocket" with value "/run/containerd/containerd.sock". Please update your configuration!
[preflight] Running pre-flight checks.
[upgrade] Running cluster health checks
[upgrade] Fetching available versions to upgrade to
[upgrade/versions] Cluster version: v1.23.9
[upgrade/versions] kubeadm version: v1.24.15
I0623 15:10:37.895497 130510 version.go:256] remote version is much newer: v1.27.3; falling back to: stable-1.24
[upgrade/versions] Target version: v1.24.15
[upgrade/versions] Latest version in the v1.23 series: v1.23.17
Components that must be upgraded manually after you have upgraded the control plane with 'kubeadm upgrade apply':
COMPONENT CURRENT TARGET
kubelet 6 x v1.23.8 v1.23.17
Upgrade to the latest version in the v1.23 series:
COMPONENT CURRENT TARGET
kube-apiserver v1.23.9 v1.23.17
kube-controller-manager v1.23.9 v1.23.17
kube-scheduler v1.23.9 v1.23.17
kube-proxy v1.23.9 v1.23.17
CoreDNS v1.8.6 v1.8.6
etcd 3.5.1-0 3.5.6-0
You can now apply the upgrade by executing the following command:
kubeadm upgrade apply v1.23.17
_____________________________________________________________________
Components that must be upgraded manually after you have upgraded the control plane with 'kubeadm upgrade apply':
COMPONENT CURRENT TARGET
kubelet 6 x v1.23.8 v1.24.15
Upgrade to the latest stable version:
COMPONENT CURRENT TARGET
kube-apiserver v1.23.9 v1.24.15
kube-controller-manager v1.23.9 v1.24.15
kube-scheduler v1.23.9 v1.24.15
kube-proxy v1.23.9 v1.24.15
CoreDNS v1.8.6 v1.8.6
etcd 3.5.1-0 3.5.6-0
You can now apply the upgrade by executing the following command:
kubeadm upgrade apply v1.24.15
_____________________________________________________________________
The table below shows the current state of component configs as understood by this version of kubeadm.
Configs that have a "yes" mark in the "MANUAL UPGRADE REQUIRED" column require manual config upgrade or
resetting to kubeadm defaults before a successful upgrade can be performed. The version to manually
upgrade to is denoted in the "PREFERRED VERSION" column.
API GROUP CURRENT VERSION PREFERRED VERSION MANUAL UPGRADE REQUIRED
kubeproxy.config.k8s.io v1alpha1 v1alpha1 no
kubelet.config.k8s.io v1beta1 v1beta1 no
_____________________________________________________________________
root@stage-mast1:/# kubeadm upgrade apply v1.24.15 --v=5
I0623 15:11:24.849327 131090 apply.go:104] [upgrade/apply] verifying health of cluster
I0623 15:11:24.849405 131090 apply.go:105] [upgrade/apply] retrieving configuration from cluster
[upgrade/config] Making sure the configuration is correct:
[upgrade/config] Reading configuration from the cluster...
[upgrade/config] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
I0623 15:11:24.887378 131090 kubelet.go:92] attempting to download the KubeletConfiguration from the new format location (UnversionedKubeletConfigMap=true)
I0623 15:11:25.234655 131090 kubelet.go:95] attempting to download the KubeletConfiguration from the DEPRECATED location (UnversionedKubeletConfigMap=false)
W0623 15:11:25.265893 131090 initconfiguration.go:120] Usage of CRI endpoints without URL scheme is deprecated and can cause kubelet errors in the future. Automatically prepending scheme "unix" to the "criSocket" with value "/run/containerd/containerd.sock". Please update your configuration!
I0623 15:11:25.273972 131090 common.go:174] running preflight checks
[preflight] Running pre-flight checks.
I0623 15:11:25.274063 131090 preflight.go:77] validating if there are any unsupported CoreDNS plugins in the Corefile
I0623 15:11:25.281540 131090 preflight.go:105] validating if migration can be done for the current CoreDNS release.
[upgrade] Running cluster health checks
I0623 15:11:25.292909 131090 health.go:162] Creating Job "upgrade-health-check" in the namespace "kube-system"
I0623 15:11:25.311582 131090 health.go:192] Job "upgrade-health-check" in the namespace "kube-system" is not yet complete, retrying
I0623 15:11:26.316508 131090 health.go:192] Job "upgrade-health-check" in the namespace "kube-system" is not yet complete, retrying
I0623 15:11:27.316525 131090 health.go:192] Job "upgrade-health-check" in the namespace "kube-system" is not yet complete, retrying
I0623 15:11:28.316204 131090 health.go:192] Job "upgrade-health-check" in the namespace "kube-system" is not yet complete, retrying
I0623 15:11:29.316365 131090 health.go:199] Job "upgrade-health-check" in the namespace "kube-system" completed
I0623 15:11:29.316391 131090 health.go:205] Deleting Job "upgrade-health-check" in the namespace "kube-system"
I0623 15:11:29.329724 131090 apply.go:112] [upgrade/apply] validating requested and actual version
I0623 15:11:29.329778 131090 apply.go:128] [upgrade/version] enforcing version skew policies
[upgrade/version] You have chosen to change the cluster version to "v1.24.15"
[upgrade/versions] Cluster version: v1.23.9
[upgrade/versions] kubeadm version: v1.24.15
[upgrade/confirm] Are you sure you want to proceed with the upgrade? [y/N]: y
[upgrade/prepull] Pulling images required for setting up a Kubernetes cluster
[upgrade/prepull] This might take a minute or two, depending on the speed of your internet connection
[upgrade/prepull] You can also perform this action in beforehand using 'kubeadm config images pull'
I0623 15:11:31.482208 131090 checks.go:834] using image pull policy: IfNotPresent
I0623 15:11:31.515857 131090 checks.go:851] pulling: registry.k8s.io/kube-apiserver:v1.24.15
I0623 15:11:31.711496 131090 checks.go:851] pulling: registry.k8s.io/kube-controller-manager:v1.24.15
I0623 15:11:31.915581 131090 checks.go:851] pulling: registry.k8s.io/kube-scheduler:v1.24.15
I0623 15:11:32.096293 131090 checks.go:851] pulling: registry.k8s.io/kube-proxy:v1.24.15
I0623 15:11:32.282869 131090 checks.go:851] pulling: registry.k8s.io/pause:3.7
I0623 15:11:32.461422 131090 checks.go:851] pulling: registry.k8s.io/etcd:3.5.6-0
I0623 15:11:32.632690 131090 checks.go:851] pulling: registry.k8s.io/coredns/coredns:v1.8.6
[preflight] Some fatal errors occurred:
[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-apiserver:v1.24.15: output: time="2023-06-23T15:11:31Z" level=fatal msg="validate service connection: CRI v1 image API is not implemented for endpoint \"unix:///run/containerd/containerd.sock\": rpc error: code = Unimplemented desc = unknown service runtime.v1.ImageService"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-controller-manager:v1.24.15: output: time="2023-06-23T15:11:31Z" level=fatal msg="validate service connection: CRI v1 image API is not implemented for endpoint \"unix:///run/containerd/containerd.sock\": rpc error: code = Unimplemented desc = unknown service runtime.v1.ImageService"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-scheduler:v1.24.15: output: time="2023-06-23T15:11:32Z" level=fatal msg="validate service connection: CRI v1 image API is not implemented for endpoint \"unix:///run/containerd/containerd.sock\": rpc error: code = Unimplemented desc = unknown service runtime.v1.ImageService"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-proxy:v1.24.15: output: time="2023-06-23T15:11:32Z" level=fatal msg="validate service connection: CRI v1 image API is not implemented for endpoint \"unix:///run/containerd/containerd.sock\": rpc error: code = Unimplemented desc = unknown service runtime.v1.ImageService"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/pause:3.7: output: time="2023-06-23T15:11:32Z" level=fatal msg="validate service connection: CRI v1 image API is not implemented for endpoint \"unix:///run/containerd/containerd.sock\": rpc error: code = Unimplemented desc = unknown service runtime.v1.ImageService"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/etcd:3.5.6-0: output: time="2023-06-23T15:11:32Z" level=fatal msg="validate service connection: CRI v1 image API is not implemented for endpoint \"unix:///run/containerd/containerd.sock\": rpc error: code = Unimplemented desc = unknown service runtime.v1.ImageService"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/coredns/coredns:v1.8.6: output: time="2023-06-23T15:11:32Z" level=fatal msg="validate service connection: CRI v1 image API is not implemented for endpoint \"unix:///run/containerd/containerd.sock\": rpc error: code = Unimplemented desc = unknown service runtime.v1.ImageService"
, error: exit status 1
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
root@stage-mast1:/# crictl image ls
WARN[0000] image connect using default endpoints: [unix:///var/run/dockershim.sock unix:///run/containerd/containerd.sock unix:///run/crio/crio.sock unix:///var/run/cri-dockerd.sock]. As the default settings are now deprecated, you should set the endpoint instead.
E0623 15:11:41.502221 131423 remote_image.go:119] "ListImages with filter from image service failed" err="rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial unix /var/run/dockershim.sock: connect: no such file or directory\"" filter="&ImageFilter{Image:&ImageSpec{Image:ls,Annotations:map[string]string{},},}"
FATA[0000] listing images: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix /var/run/dockershim.sock: connect: no such file or directory"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment