-
Notifications
You must be signed in to change notification settings - Fork 250
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加固操作调整修改方式,避免多次重启控制面pod #2708
Conversation
bcs-ops/k8s/install_k8s
Outdated
@@ -42,85 +42,92 @@ if [ -z "${goversion}" ];then | |||
job_fail "get go version failed, configure etcd failed" | |||
fi | |||
|
|||
mkdir /tmp/backup | |||
cp /etc/kubernetes/manifests/* /tmp/backup | |||
cp /etc/kubernetes/manifests/* ./ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
./
还是用绝对路径吧。 ${ROOT}/
这种
bcs-ops/k8s/install_k8s
Outdated
@@ -42,85 +42,92 @@ if [ -z "${goversion}" ];then | |||
job_fail "get go version failed, configure etcd failed" | |||
fi | |||
|
|||
mkdir /tmp/backup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
备份最好加上时间路径。比如 /tmp/backup/k8s-{timestamp}
这种
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 151 同样 kubeconfig.conf 和 config.conf 都用绝对路径。备份的文件扔到/tmp/backup/k8s-{timestamp}
下
line 139, 如果要用 crictl,需要带上runtime-endpoint crictl --runtime-endpoint unix:///run/containerd/containerd.sock ps
。 目前crictl 没有去配置。直接运行会抛出错误:
# crictl ps
WARN[0000] runtime 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.
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.
E1026 14:28:59.770572 95905 remote_runtime.go:390] "ListContainers with filter from runtime service failed" err="rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial unix /var/run/dockershim.sock: connect: connection refused\"" filter="&ContainerFilter{Id:,State:&ContainerStateValue{State:CONTAINER_RUNNING,},PodSandboxId:,LabelSelector:map[string]string{},}"
FATA[0000] listing containers: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix /var/run/dockershim.sock: connect: connection refused"
1.kube-proxy修改为只在第一台master操作 2.yaml配置文件修改备份与操作的目录
K8S加固操作调整修改方式,避免多次重启控制面pod