我在集群中运行了密钥库,因此我想将默认的身份验证Web路径更改为类似于密钥库/ auth的某种方式,以便我可以通过myhost / keycloak / auth /访问它 我添加了一个初始化容器来运行此命令,但它显示了我的意思:
来自服务器(BadRequest)的错误:容器“ keycloak-6df9d8968d-l7t9b”中的容器“ keycloak”正在等待启动:PodInitializing
我认为init容器中的命令语法是错误的,因为我手动进行了尝试并且有效
这是初始化容器:
...
initContainers:
- name: keycloak-init
image: busybox
command: [sed, -i, -e, 's/<web-context>auth<\/web-context>/<web-context>keycloak\/auth<\/web-context>/', /opt/jboss/keycloak/standalone/configuration/standalone.xml]
...
答案 0 :(得分:2)
主容器未启动,因为initContainer
容器中有一个错误,如您从logs
所见。
sed: /opt/jboss/keycloak/standalone/configuration/standalone.xml: No such file or directory
可能您忘记了也在initContainer中用该文件装载卷