@[TOC] prometheus添加k8s集群外部监控
使用场景
生产环境中Harbor部署在k8s集群外,开启Harbor-export 使用k8s集群中的prometheus做监控。
补充一下harbor的安装
说一下坑点:
- 设置中无法切换LDAP ,How to change auth mode when the auth_mode is not editable?;
docker exec -it harbor-db bash
psql -U postgres
\c registry
select * from harbor_user;
delete from harbor_user where user_id > 2;
- 忘记admin密码,How to reset admin password?;
docker exec -it harbor-db
psql -U postgres
\c registry
update harbor_user set salt='', password='' where user_id = 1;
##
docker-compose down -v
docker-compose up -d
- LDAP UID 修改后无法登陆,When LDAP UID setting is changed, some LDAP user can not login
docker exec -it harbor-db bash
psql -U postgres
\c registry
select * from harbor_user;
delete from harbor_user where user_id > 2;
- How to add a certificate for the LDAP server?
[A] After installed the Harbor, there is a directory under common/config/shared/trust-certificates Copy the LDAP certificate, for example, ldap_ca.crt to this directory and restart the Harbor, The certificate is added to the trust store of the core container, and then you could enable “Verify Cert” in the LDAP configuration.