ingress configuration for dashboard

后端 未结 4 1332
感情败类
感情败类 2020-12-31 09:12

I did nginx ingress controller tutorial from github and exposed kubernetes dashboard

kubernetes-dashboard   NodePort    10.233.53.77            4         


        
4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-31 09:20

    Just for code reference. There are 2 gtochas. Setting the proper annotations since the dashboard talks https and using the correct namepace for the ingress. tls config is optional.

    ---
    apiVersion: extensions/v1beta1
    kind: Ingress
    metadata:
      name: dashboard-google
      namespace: kube-system
      annotations:
        nginx.ingress.kubernetes.io/secure-backends: "true"
        nginx.ingress.kubernetes.io/ssl-passthrough: "true"
    spec:
      tls:
        - hosts:
          - kube.mydomain.com
          secretName: tls-secret
      rules:
        - host: kube.mydomain.com
          http:
            paths:
            - path: /
              backend:
                serviceName: kubernetes-dashboard
                servicePort: 443
    

提交回复
热议问题