光辉岁月

k8s ingress配置

k8s ingress配置

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-0.32.0/deploy/static/provider/baremetal/deploy.yaml
  • 基础配置
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ingress-nginx
spec:
  rules:
  # 配置七层域名
  - host: foo.bar.com
    http:
      paths:
      # 配置Context Path
      - path: /
        backend:
          serviceName: nginx
          servicePort: 80
posted @ 2020-05-22 11:16  taiman  阅读(1339)  评论(0编辑  收藏  举报
哈哈哈