Ingress-nginx资源清单
- http
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-http
namespace: test
spec:
ingressClassName: nginx
rules:
- host: test.nginx.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: service
port:
number: 3017
- https
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-http
namespace: test
spec:
tls:
- hosts:
- test.nginx.com
secretName: my-tls
ingressClassName: nginx
rules:
- host: test.nginx.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: service
port:
number: 80
测试
- 在本机,进入C:\Windows\System32\drivers\etc,修改hosts文件
- 增加域名解析
本文来自博客园,作者:弩哥++,转载请注明原文链接:https://www.cnblogs.com/bangbangzoutianya/p/16874944.html