查看它使用哪种 Identity Provider
oc get OAuth cluster -o yaml
spec 里面会描述
Operator Authentication
描述 operator authentication
oc describe authentication
有两个 namespace 和 Authentication 相关
Project openshift-authentication
查看该项目下的 pods
oc get pods -n openshift-authentication
Project openshift-authentication 是用来管理 openshift-OAuth的. 功能类似反向代理. 提供 Authentication 和 Authorization 给 OpenShift OAuth 服务器的. 依赖于 identity provider 的 Operator配置.
查看 pod 的 logs
oc logs oauth-openshift-xxxxxxxx-xxxxxx
如果想看更多关于 oauth 的 logs, 可以这样做.
想看到更多关于项目openshift-authentication 的logs
第一步, 查看openshift-authentication 的 pod 状态
oc get pod -n openshift-authentication
第二步,查看 pod 的logs
oc logs openshift-authentication-xxxxx -n openshift-authentication
第三步,更改CRD, 制造一些 logs去观察
oc edit authentications.operator.openshift.io
把 logLevel: 改成 Debug保存
spec:
logLevel: Debug
第四步,再次查看 logs. 你会看到很多新的 logs 可以去分析.
oc logs openshift-authentication-xxxxx -n openshift-authentication
第五步, 把 loglevel 改回原先的默认设置,这样可以避免泄露敏感日志泄露.
OpenShift-authentication-operator
OpenShift-authentication-operator负责管理 custom resources . 管理 identity provider. ta
这个命令可以查看authentications.operator.openshift.io的 crd
oc get crd authentications.operator.openshift.io -o yaml