问题情况描述如下:

        在k8s集群中,通过helm部署了harbor,访问方式设置为Nodeport,关闭了TLS,注释了nodeport中https中相关内容,在网页通过“http://ip+30002”到harbor的时候,提示:

Cookie “_gorilla_csrf” has been rejected because a non-HTTPS cookie can’t be set as “secure”. 4 current

输入密码登录提示:An error occurred when signing in: 403:Forbidden

解决方法如下:

        1、执行命令,直接在线修改:

kubectl edit cm harbor-core -n harbor 

        2、找到这一行:

EXT_ENDPOINT: https://core.harbor.domain 

        3、改成:

EXT_ENDPOINT: http://core.harbor.domain 

        4、保存退出。

        5、重启 harbor-core Pod

        kubectl delete pod harbor-core-xxxx-xxxx -n harbor 

403问题解决,登陆成功或者问题变成harbor提示401

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐