k8s环境huise环境业务镜像同步到线上业务镜像平台

使用场景和原理:

在k8s中,我需要把huise测试完成的镜像发布到线上,为了快快快,所有直接替换镜像。我们环境huise镜像是私有仓库,线上是阿里云仓库所以需要先pull->tag->push-set image

代码仓库地址:imagesrync

当然我们也是介入了ldap的登录界面的如图:

在这里插入图片描述

nginx接入ldap和部署业务配置:

server {
    listen 80;
    server_name test.images.com;
    return 301 https://$host$request_uri;
}

server {
    listen 443    ssl;
    server_name   test.images.com;
    access_log    /var/log/nginx/imagesync_access.log json;
    error_log     /var/log/nginx/imagesync_error.log;
    ssl_certificate     conf.d/dkcert/test.images.com.pem;
    ssl_certificate_key conf.d/dkcert/test.images.com.key;
    location /api/ {
         proxy_intercept_errors on;
         auth_request /auth-proxy;
    #     error_page 401 403 =200 /login;
         proxy_pass http://192.168.16.30:8082/;  #后端接口
    }
    location / {
         proxy_intercept_errors on;
         auth_request /auth-proxy;
         error_page 401 403 =200 /login;
         root conf/conf.d/images_tongbu_html/;  #前端文件
       # proxy_read_timeout 90;
    }


  #ldap配置
       location /login {  
        proxy_pass http://192.168.12.191:9000/login;
        proxy_set_header  X-Target  $request_uri;
}


  #ldap配置
         location = /auth-proxy {
          internal;
           proxy_pass http://192.168.12.191:8888;
           proxy_cache_key "$http_authorization$cookie_nginxauth";
           proxy_cache_valid 200 403 1m;
           proxy_pass_request_body  off;
           proxy_set_header Content-Length "";
           proxy_set_header X-Ldap-URL "ldap://192.168.14.58:389";
           proxy_set_header X-Ldap-BindDN "cn=admin,dc=shenhu,dc=com";
           proxy_set_header X-Ldap-BindPass "lzx123456";
           proxy_set_header X-Ldap-BaseDN "dc=shenhu,dc=com";
           proxy_set_header X-CookieName "nginxauth";
           proxy_set_header Cookie nginxauth=$cookie_nginxauth;
         }




}

nginx接入ldap可自行去配置

在这里插入图片描述



  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值