k8s nginx+ingress 配置

1 nginx> ingress 配置:

2 nginx >service 配置

3 nginx pod配置:

4 nginx.conf 配置文件:

复制代码
    # web端v1
	server
	{
		listen 30006;
		add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
                #add_header Content-Security-Policy "default-src 'self' http://test123.realize.cn; font-src 'self' data:; script-src unsafe-inline; script-src-elem unsafe-inline";
                add_header X-XSS-Protection "1; mode=block";
                add_header X-Frame-Options "SAMEORIGIN always";
                add_header X-Content-Type-Options "nosniff";

		# 转发websocket需要的设置
		proxy_set_header X-Real_IP $remote_addr;
		proxy_set_header Host $host;
		proxy_set_header X_Forward_For $proxy_add_x_forwarded_for;
		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection 'upgrade';

		location / {
			proxy_pass http://frontdongmi-official-v1.rz-dt:30001/;
		}       
        location /rzwebgateway/ {
                        client_max_body_size 1024M;
                        client_body_buffer_size 1024M;
                        proxy_pass http://realize-gateway.rz-dt:9300/;
		}
        location /gateway/ {
                       proxy_set_header Connection 'keep-alive';
			proxy_pass http://gatewayserver.rz-dt:30001/;
		}
}


       # 采集平台
server
{
    listen 30004;
    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
    # 转发websocket需要的设置
    proxy_set_header X-Real_IP $remote_addr;
    proxy_set_header Host $host;
    proxy_set_header X_Forward_For $proxy_add_x_forwarded_for;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    location / {
        proxy_pass http://spiderflow.rz-dt:30001/;
    }
    access_log /var/log/nginx/spider.reize.cn.log;
}

    # 视频营销
	server
	{
		listen 30005;
		add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
		# 转发websocket需要的设置
		proxy_set_header X-Real_IP $remote_addr;
		proxy_set_header Host idtcdn.oss-cn-hangzhou.aliyuncs.com;
		proxy_set_header X_Forward_For $proxy_add_x_forwarded_for;
		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection 'upgrade';
		location / {
			proxy_pass http://reize.oss-cn-hangzhou.aliyuncs.com/;
		}
		access_log /var/log/nginx/video.reize.cn.log;
	}
}
相关推荐
努力努力再努力wz22 分钟前
【Docker 入门系列】:从 Namespace、CGroup 到 LXC:理解容器运行时、rootfs 与 LXC 实战
运维·docker·容器
JavaPub-rodert1 小时前
Docker 多阶段构建:为什么生产环境镜像可以小 90%
运维·docker·容器
2601_962218472 小时前
万象生鲜系统多账套隔离技术适配集团生鲜企业集团化数字化管控
大数据·运维·微服务·云原生·架构
@PHARAOH2 小时前
WHAT - 微服务统一入口配置原理
微服务·云原生·架构
PC2005-cloud3 小时前
Qdrant 连接失败排查:localhost 解析到 __1,而 Docker 只绑了 IPv4
运维·docker·容器
2601_962218475 小时前
万象生鲜系统智能报表引擎技术为生鲜企业提供数字化经营分析能力
大数据·运维·微服务·云原生·架构
Meta396 小时前
cenots8安装docker
docker·容器·centos
CAE虚拟与现实9 小时前
docker desktop中的build功能是要build什么
java·docker·容器
fb_123459 小时前
Docker入门-第1-2章-容器生态系统与架构详解
docker·容器·架构
allnlei11 小时前
s6-overlay - 装在 Docker 容器里的轻量级管家
java·docker·容器