OpenShift Authentication Troubleshooting 常用命令

查看它使用哪种 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
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值