pl92 请问如何查询及更改用户、角色。 查询用户是这样吗? ldapsearch -x -b 'ou=Users,dc=example,dc=org' -D 'cn=admin,dc=kubesphere,dc=io' '(objectclass=inetOrgPerson)'
hongming pl92 可以参考一下ks-installer 中的账户初始化逻辑 https://github.com/kubesphere/ks-installer/blob/master/roles/ks-core/prepare/files/ks-init/admin.yaml https://github.com/kubesphere/ks-installer/blob/master/roles/ks-core/prepare/tasks/ks-init.yaml#L8-L13
hongming pl92 ldap 是为了对接jenkins 和 sonarqube 目前还保留着(最终会被移除) , KubeSphere 中的账户实体是 users.iam.kubesphere.io CRD,可以直接通过kubectl 操作
hongming pl92 LDAP 中的用户这么查询,可以直接通过LDAP 命令操作 kubectl -n kubesphere-system exec -it openldap-0 -- sh -c 'ldapsearch -D "cn=admin,dc=kubesphere,dc=io" -b "OU=Users,dc=kubesphere,dc=io" -w admin' 也可以通过kubesphere API 进行管理,https://v2-1.docs.kubesphere.io/docs/api/kubesphere#operation/CreateUser