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;
	}
}
相关推荐
皮锤打乌龟4 小时前
(干货)Jenkins使用kubernetes插件连接k8s的认证方式
运维·kubernetes·jenkins
南猿北者5 小时前
docker Network(网络)
网络·docker·容器
ggaofeng8 小时前
通过命令学习k8s
云原生·容器·kubernetes
death bell9 小时前
Docker基础概念
运维·docker·容器
想学习java初学者11 小时前
Docker Compose部署Kafka(非Zookeeper)
docker·容器·kafka
qq_道可道12 小时前
K8S升级到1.24后,切换运行时导致 dind 构建镜像慢根因定位与解决
云原生·容器·kubernetes
SONGW201812 小时前
k8s拓扑域 :topologyKey
kubernetes
weixin_4381973813 小时前
K8S实现反向代理,负载均衡
linux·运维·服务器·nginx·kubernetes
郝同学的测开笔记14 小时前
云原生探索系列(十二):Go 语言接口详解
后端·云原生·go
mit6.82415 小时前
[Docker#5] 镜像仓库 | 命令 | 实验:搭建Nginx | 创建私有仓库
linux·后端·docker·云原生