我正在尝试将 postgres 参数(shared_buffers)设置到我的 postgres 数据库 pod 中。我试图设置一个 init 容器来设置 db 变量,但它不起作用,因为 init 容器以 root 用户身份运行。
在 pod 上编辑 db 变量的最佳方法是什么?我无法在图像中进行更改,因为不同实例的变量需要不同。如果有帮助,我需要运行的命令是“postgres -c”命令。
"root" execution of the PostgreSQL server is not permitted.
The server must be started under an unprivileged user ID to prevent
possible system security compromise. See the documentation for
more information on how to properly start the server.
Run Code Online (Sandbox Code Playgroud) 重启集群中所有 Pod 的最佳方法是什么?我在想在 kubernetes 中设置一个 cronjob 任务来正常执行此操作并确保集群负载均衡,但是正常执行此操作的最佳实践是什么?另外,将其作为一次性任务的最佳方法是什么?
我在添加了 --pod-network-cidr 的情况下部署了我的集群,并使用 calicoctl 创建了新的 ip 池以将 pod 更改为该范围。我遇到的问题正是我需要在 kubernetes 端更改以更改 pod cidr 范围的内容?我是在 API 服务器、控制器管理器和调度程序中进行更改,还是只需要更改特定部分。我尝试只更改控制器管理器,并且在更改 yaml 中的 --cluster-cidr 后,那些控制平面 pod 会进入崩溃循环。
控制器管理器日志中的输出如下?
controllermanager.go:235] 错误启动控制器:未能将 idx [0] 处的 cidr[192.168.0.0/24] 标记为节点已占用::cidr 192.168.0.0/24 超出集群 cidr 10.0.0.0/16 的范围