我正在尝试使用以下说明部署Red Hat Single Sign-On容器:https://access.redhat.com/documentation/en-us/red_hat_jboss_middleware_for_openshift/3/html/red_hat_jboss_sso_for_openshift/get_started。但是,当我部署容器时,我收到错误“错误创建:pods”sso-1-“被禁止:找不到服务帐户项目名称/ sso-service-account,在创建服务帐户后重试。”< / p>
重现问题的步骤:
project-name
keytool -genkeypair -alias keystore -keyalg RSA -keystore keystore.jks -storepass password
keytool -genkeypair -alias jgroups -keyalg RSA -keystore jgroups.jceks -storepass password
oc create secret generic sso-app-secret --from-file=keystore.jks --from-file=jgroups.jceks
oc create serviceaccount sso-service-account
oc policy add-role-to-user view system:serviceaccount:project-name:sso-service-account -n project-name
oc secret add sa/sso-service-account secret/sso-app-secret
sso70-https
答案 0 :(得分:0)
oc create serviceaccount sso-service-account -n project-name
确保使用@debianmaster
所述的-n
在正确的命名空间中创建它