chenlulouis

暴走笑话 杭州空调维修 杭州燃气灶维修 杭州洗衣机维修 上海ktv酒吧招聘 上海招聘 上海夜场招聘 上海夜场招聘

导航

K8S-ingress + 域名: 外部访问集群方式。

127.0.0.1 timeserver.example.com
127.0.0.1 robohash.example.com


kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/cloud/deploy.yaml

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: timeserver-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
spec:
ingressClassName: nginx
rules:
- host: timeserver.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: timeserver-internal
port:
number: 80
- host: robohash.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: robohash-internal
port:
number: 80







http://timeserver.example.com
http://robohash.example.com
https://timeserver.example.com
https://robohash.example.com

posted on 2025-04-03 14:47  chenlulouis  阅读(17)  评论(0)    收藏  举报