7.2.3 分场景使用示例
分场景使用示例
ingress internal使用示例
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: internal
namespace: default
labels:
traffic-type: internal
annotations:
kubernetes.io/ingress.class: traefik
spec:
rules:
- host: ngx-internal.example.com
http:
paths:
- backend:
serviceName: nginx
servicePort: 80
ingress external 使用示例
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: internal
namespace: default
labels:
traffic-type: external
annotations:
kubernetes.io/ingress.class: traefik
spec:
rules:
- host: ngx-external.example.com
http:
paths:
- backend:
serviceName: nginx
servicePort: 80
ingress public 使用示例
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: internal
namespace: default
labels:
traffic-type: public
annotations:
kubernetes.io/ingress.class: traefik
spec:
rules:
- host: ngx-public.example.com
http:
paths:
- backend:
serviceName: nginx
servicePort: 80
ingress Devops 使用示例
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: devops
namespace: default
labels:
traffic-type: devops
annotations:
kubernetes.io/ingress.class: traefik
spec:
rules:
- host: ngx-devops.example.com
http:
paths:
- backend:
serviceName: nginx
servicePort: 80
最后更新于
这有帮助吗?