LDAP配置
修改kubesphere-config 配置
kubectl -n kubesphere-system edit cm kubesphere-config
参考如下配置中identityProviders
部分
authentication:
authenticateRateLimiterMaxTries: 10
authenticateRateLimiterDuration: 10m
recordRetentionPeriod: 10s
multipleLogin: true
jwtSecret: "xxxxxx"
oauthOptions:
accessTokenMaxAge: 1h
accessTokenInactivityTimeout: 30m
identityProviders:
- name: ldap
type: LDAPIdentityProvider
mappingMethod: auto
provider:
host: 192.168.0.2:389
managerDN: uid=root,cn=users,dc=nas
managerPassword: 123456
userSearchBase: cn=users,dc=nas
loginAttribute: uid
mailAttribute: mail
重启ks-apiserver
kubectl -n kubesphere-system rollout restart deploy/ks-apiserver