k8s 添加ingress 暴露服务
作者:互联网
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 可查看
标签:kubectl,ingress,pgadmin,namespace,添加,file,k8s 来源: https://www.cnblogs.com/freefei/p/12069537.html