[root@k8s-node-02 ~]# kubeadm reset --cri-socket /var/run/cri-dockerd.sock
W0221 22:18:30.321890 108186 preflight.go:55] [reset] WARNING: Changes made to this host by 'kubeadm init' or 'kubeadm join' will be reverted.
[reset] Are you sure you want to proceed? [y/N]: y
W0221 22:18:32.838690 108186 removeetcdmember.go:85] [reset] No kubeadm config, using etcd pod spec to get data directory
[reset] No etcd config found. Assuming external etcd
[reset] Please, manually reset etcd to prevent further issues
[reset] Stopping the kubelet service
[reset] Unmounting mounted directories in "/var/lib/kubelet"
W0221 22:18:37.911609 108186 cleanupnode.go:94] [reset] Failed to remove containers: [failed to stop running pod I0221: output: I0221 22:18:33.113881 108218 util_unix.go:103] "Using this endpoint is deprecated, please consider using full URL format" endpoint="/var/run/cri-dockerd.sock" URL="unix:///var/run/cri-dockerd.sock"
E0221 22:18:33.118604 108218 remote_runtime.go:205] "StopPodSandbox from runtime service failed" err="rpc error: code = Unknown desc = [failed to get checkpoint for sandbox \"I0221\": checkpoint is not found, failed to get sandbox status: Error response from daemon: No such container: I0221]" podSandboxID="I0221"
time="2024-02-21T22:18:33+08:00" level=fatal msg="stopping the pod sandbox \"I0221\": rpc error: code = Unknown desc = [failed to get checkpoint for sandbox \"I0221\": checkpoint is not found, failed to get sandbox status: Error response from daemon: No such container: I0221]"
: exit status 1, failed to stop running pod 22:18:32.911038: output: I0221 22:18:33.310362 108238 util_unix.go:103] "Using this endpoint is deprecated, please consider using full URL format" endpoint="/var/run/cri-dockerd.sock" URL="unix:///var/run/cri-dockerd.sock"
E0221 22:18:33.318550 108238 remote_runtime.go:205] "StopPodSandbox from runtime service failed" err="rpc error: code = Unknown desc = networkPlugin cni failed to teardown pod \"_\" network: could not retrieve port mappings: invalid key: \"22:18:32.911038\"" podSandboxID="22:18:32.911038"
time="2024-02-21T22:18:33+08:00" level=fatal msg="stopping the pod sandbox \"22:18:32.911038\": rpc error: code = Unknown desc = networkPlugin cni failed to teardown pod \"_\" network: could not retrieve port mappings: invalid key: \"22:18:32.911038\""
: exit status 1, failed to remove running container 108192: output: I0221 22:18:33.704212 108298 util_unix.go:103] "Using this endpoint is deprecated, please consider using full URL format" endpoint="/var/run/cri-dockerd.sock" URL="unix:///var/run/cri-dockerd.sock"
getting sandbox status of pod "108192": rpc error: code = Unknown desc = Error response from daemon: No such container: 108192
: exit status 1, failed to stop running pod util_unix.go:103]: output: I0221 22:18:33.925259 108319 util_unix.go:103] "Using this endpoint is deprecated, please consider using full URL format" endpoint="/var/run/cri-dockerd.sock" URL="unix:///var/run/cri-dockerd.sock"
E0221 22:18:33.933909 108319 remote_runtime.go:205] "StopPodSandbox from runtime service failed" err="rpc error: code = Unknown desc = networkPlugin cni failed to teardown pod \"_\" network: could not retrieve port mappings: invalid key: \"util_unix.go:103]\"" podSandboxID="util_unix.go:103]"
time="2024-02-21T22:18:33+08:00" level=fatal msg="stopping the pod sandbox \"util_unix.go:103]\": rpc error: code = Unknown desc = networkPlugin cni failed to teardown pod \"_\" network: could not retrieve port mappings: invalid key: \"util_unix.go:103]\""
: exit status 1, failed to stop running pod "Using: output: I0221 22:18:34.125710 108339 util_unix.go:103] "Using this endpoint is deprecated, please consider using full URL format" endpoint="/var/run/cri-dockerd.sock" URL="unix:///var/run/cri-dockerd.sock"
E0221 22:18:34.131325 108339 remote_runtime.go:205] "StopPodSandbox from runtime service failed" err="rpc error: code = Unknown desc = [failed to get checkpoint for sandbox \"\\\"Using\": invalid key: \"\\\"Using\", failed to get sandbox status: Error response from daemon: No such container: \"Using]" podSandboxID="\"Using"
time="2024-02-21T22:18:34+08:00" level=fatal msg="stopping the pod sandbox \"\\\"Using\": rpc error: code = Unknown desc = [failed to get checkpoint for sandbox \"\\\"Using\": invalid key: \"\\\"Using\", failed to get sandbox status: Error response from daemon: No such container: \"Using]"
: exit status 1, failed to remove running container this: output: I0221 22:18:34.543335 108393 util_unix.go:103] "Using this endpoint is deprecated, please consider using full URL format" endpoint="/var/run/cri-dockerd.sock" URL="unix:///var/run/cri-dockerd.sock"
getting sandbox status of pod "this": rpc error: code = Unknown desc = Error response from daemon: No such container: this
: exit status 1, failed to remove running container endpoint: output: I0221 22:18:34.920105 108445 util_unix.go:103] "Using this endpoint is deprecated, please consider using full URL format" endpoint="/var/run/cri-dockerd.sock" URL="unix:///var/run/cri-dockerd.sock"
getting sandbox status of pod "endpoint": rpc error: code = Unknown desc = Error response from daemon: No such container: endpoint
: exit status 1, failed to remove running container is: output: I0221 22:18:35.303518 108498 util_unix.go:103] "Using this endpoint is deprecated, please consider using full URL format" endpoint="/var/run/cri-dockerd.sock" URL="unix:///var/run/cri-dockerd.sock"
getting sandbox status of pod "is": rpc error: code = Unknown desc = Error response from daemon: No such container: is
: exit status 1, failed to stop running pod deprecated,: output: I0221 22:18:35.502281 108518 util_unix.go:103] "Using this endpoint is deprecated, please consider using full URL format" endpoint="/var/run/cri-dockerd.sock" URL="unix:///var/run/cri-dockerd.sock"
E0221 22:18:35.509564 108518 remote_runtime.go:205] "StopPodSandbox from runtime service failed" err="rpc error: code = Unknown desc = networkPlugin cni failed to teardown pod \"_\" network: could not retrieve port mappings: invalid key: \"deprecated,\"" podSandboxID="deprecated,"
time="2024-02-21T22:18:35+08:00" level=fatal msg="stopping the pod sandbox \"deprecated,\": rpc error: code = Unknown desc = networkPlugin cni failed to teardown pod \"_\" network: could not retrieve port mappings: invalid key: \"deprecated,\""
: exit status 1, failed to remove running container please: output: I0221 22:18:35.898679 108571 util_unix.go:103] "Using this endpoint is deprecated, please consider using full URL format" endpoint="/var/run/cri-dockerd.sock" URL="unix:///var/run/cri-dockerd.sock"
getting sandbox status of pod "please": rpc error: code = Unknown desc = Error response from daemon: No such container: please
: exit status 1, failed to remove running container consider: output: I0221 22:18:36.283251 108623 util_unix.go:103] "Using this endpoint is deprecated, please consider using full URL format" endpoint="/var/run/cri-dockerd.sock" URL="unix:///var/run/cri-dockerd.sock"
getting sandbox status of pod "consider": rpc error: code = Unknown desc = Error response from daemon: No such container: consider
: exit status 1, failed to remove running container using: output: I0221 22:18:36.687468 108675 util_unix.go:103] "Using this endpoint is deprecated, please consider using full URL format" endpoint="/var/run/cri-dockerd.sock" URL="unix:///var/run/cri-dockerd.sock"
getting sandbox status of pod "using": rpc error: code = Unknown desc = Error response from daemon: No such container: using
: exit status 1, failed to remove running container full: output: I0221 22:18:37.089088 108728 util_unix.go:103] "Using this endpoint is deprecated, please consider using full URL format" endpoint="/var/run/cri-dockerd.sock" URL="unix:///var/run/cri-dockerd.sock"
getting sandbox status of pod "full": rpc error: code = Unknown desc = Error response from daemon: No such container: full
: exit status 1, failed to stop running pod URL: output: I0221 22:18:37.266203 108749 util_unix.go:103] "Using this endpoint is deprecated, please consider using full URL format" endpoint="/var/run/cri-dockerd.sock" URL="unix:///var/run/cri-dockerd.sock"
E0221 22:18:37.272216 108749 remote_runtime.go:205] "StopPodSandbox from runtime service failed" err="rpc error: code = Unknown desc = [failed to get checkpoint for sandbox \"URL\": checkpoint is not found, failed to get sandbox status: Error response from daemon: No such container: URL]" podSandboxID="URL"
time="2024-02-21T22:18:37+08:00" level=fatal msg="stopping the pod sandbox \"URL\": rpc error: code = Unknown desc = [failed to get checkpoint for sandbox \"URL\": checkpoint is not found, failed to get sandbox status: Error response from daemon: No such container: URL]"
: exit status 1, failed to stop running pod format": output: I0221 22:18:37.466599 108769 util_unix.go:103] "Using this endpoint is deprecated, please consider using full URL format" endpoint="/var/run/cri-dockerd.sock" URL="unix:///var/run/cri-dockerd.sock"
E0221 22:18:37.474168 108769 remote_runtime.go:205] "StopPodSandbox from runtime service failed" err="rpc error: code = Unknown desc = networkPlugin cni failed to teardown pod \"_\" network: could not retrieve port mappings: invalid key: \"format\\\"\"" podSandboxID="format\""
time="2024-02-21T22:18:37+08:00" level=fatal msg="stopping the pod sandbox \"format\\\"\": rpc error: code = Unknown desc = networkPlugin cni failed to teardown pod \"_\" network: could not retrieve port mappings: invalid key: \"format\\\"\""
: exit status 1, failed to stop running pod endpoint="/var/run/cri-dockerd.sock": output: I0221 22:18:37.696206 108789 util_unix.go:103] "Using this endpoint is deprecated, please consider using full URL format" endpoint="/var/run/cri-dockerd.sock" URL="unix:///var/run/cri-dockerd.sock"
E0221 22:18:37.704741 108789 remote_runtime.go:205] "StopPodSandbox from runtime service failed" err="rpc error: code = Unknown desc = networkPlugin cni failed to teardown pod \"_\" network: could not retrieve port mappings: invalid key: \"endpoint=\\\"/var/run/cri-dockerd.sock\\\"\"" podSandboxID="endpoint=\"/var/run/cri-dockerd.sock\""
time="2024-02-21T22:18:37+08:00" level=fatal msg="stopping the pod sandbox \"endpoint=\\\"/var/run/cri-dockerd.sock\\\"\": rpc error: code = Unknown desc = networkPlugin cni failed to teardown pod \"_\" network: could not retrieve port mappings: invalid key: \"endpoint=\\\"/var/run/cri-dockerd.sock\\\"\""
: exit status 1, failed to stop running pod URL="unix:///var/run/cri-dockerd.sock": output: I0221 22:18:37.903473 108809 util_unix.go:103] "Using this endpoint is deprecated, please consider using full URL format" endpoint="/var/run/cri-dockerd.sock" URL="unix:///var/run/cri-dockerd.sock"
E0221 22:18:37.909505 108809 remote_runtime.go:205] "StopPodSandbox from runtime service failed" err="rpc error: code = Unknown desc = [failed to get checkpoint for sandbox \"URL=\\\"unix:///var/run/cri-dockerd.sock\\\"\": invalid key: \"URL=\\\"unix:///var/run/cri-dockerd.sock\\\"\", failed to get sandbox status: Error response from daemon: No such container: URL=\"unix:/var/run/cri-dockerd.sock\"]" podSandboxID="URL=\"unix:///var/run/cri-dockerd.sock\""
time="2024-02-21T22:18:37+08:00" level=fatal msg="stopping the pod sandbox \"URL=\\\"unix:///var/run/cri-dockerd.sock\\\"\": rpc error: code = Unknown desc = [failed to get checkpoint for sandbox \"URL=\\\"unix:///var/run/cri-dockerd.sock\\\"\": invalid key: \"URL=\\\"unix:///var/run/cri-dockerd.sock\\\"\", failed to get sandbox status: Error response from daemon: No such container: URL=\"unix:/var/run/cri-dockerd.sock\"]"
: exit status 1]
[reset] Deleting contents of directories: [/etc/kubernetes/manifests /etc/kubernetes/pki]
[reset] Deleting files: [/etc/kubernetes/admin.conf /etc/kubernetes/kubelet.conf /etc/kubernetes/bootstrap-kubelet.conf /etc/kubernetes/controller-manager.conf /etc/kubernetes/scheduler.conf]
[reset] Deleting contents of stateful directories: [/var/lib/kubelet]
The reset process does not clean CNI configuration. To do so, you must remove /etc/cni/net.d
The reset process does not reset or clean up iptables rules or IPVS tables.
If you wish to reset iptables, you must do so manually by using the "iptables" command.
If your cluster was setup to utilize IPVS, run ipvsadm --clear (or similar)
to reset your system's IPVS tables.
The reset process does not clean your kubeconfig files and you must remove them manually.
Please, check the contents of the $HOME/.kube/config file.
[root@k8s-node-02 ~]# kubeadm join 10.10.10.100:6443 --token bkld6x.7bn54sic1tbry69k --discovery-token-ca-cert-hash sha256:18ce7af434e99a8edd527be3ea83603e68c50fb676b7cf9eeeb169f5ded88b7f --cri-socket /var/run/cri-dockerd.sock
W0221 22:19:16.247305 108905 initconfiguration.go:119] 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 "/var/run/cri-dockerd.sock". Please update your configuration!
[preflight] Running pre-flight checks
[preflight] Reading configuration from the cluster...
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Starting the kubelet
[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...
This node has joined the cluster:
* Certificate signing request was sent to apiserver and a response was received.
* The Kubelet was informed of the new secure connection details.
Run 'kubectl get nodes' on the control-plane to see this node join the cluster.
5 在master节点查看node加入情况
[root@k8s-master ~]# kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
k8s-master Ready control-plane 2d v1.25.0 10.10.10.100 <none> CentOS Linux 7 (Core) 3.10.0-1160.el7.x86_64 docker://25.0.3
k8s-node-01 Ready <none> 47h v1.25.0 10.10.10.177 <none> CentOS Linux 7 (Core) 3.10.0-1160.el7.x86_64 docker://25.0.3
k8s-node-02 Ready <none> 12s v1.25.0 10.10.10.112 <none> CentOS Linux 7 (Core) 3.10.0-1160.el7.x86_64 docker://25.0.3
CF1468J Road Reform 题解
link
CF1468J Road Reform
题面翻译
给定一个有 n n n 个节点, m m m 条无向带权边的图,和一个参数 k k k,第 i i i 条边权值为 s i s_i si。
现在你要保留这个图中的 n − 1 n-1 n−1 条边使得这个图变…
Project_Euler-06 题解 题目描述 两个公式
等差数列求和公式 i i i项: a i a_{i} ai 项数: n n n 公差: d d d 和: S n S_{n} Sn a n a 1 ( n − 1 ) d S n n ( a 1 a n ) 2 a_{n} a_{1} (n - 1)d\\ S_{n} \frac{n(a_…