k8s 添加ingress 暴露服务
2019-12-19 18:54 freefei 阅读(732) 评论(0) 编辑 收藏 举报vim file.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: pgadmin
labels:
k8s-app: pgadmin
namespace: c7n-system
spec:
rules:
- host: pgadmin.ls.com
http:
paths:
- path: /
backend:
serviceName: pgadmin
servicePort: 80
kubectl apply -f file.yaml
即可直接暴露
kubectl get ingress -n namespace 可查看