Skip to content

Ingress

Nginx Ingress Class

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
  name: replace_me
  namespace: replace_me
spec:
  #ingressClassName: nginx
  rules:
  - host: replace_me
    http:
      paths:
      - backend:
          service:
            name: replace_me
            port:
              name: replace_me
        pathType: ImplementationSpecific

Kubernetes Dashboard

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/backend-protocol: HTTPS
  labels:
    app.kubernetes.io/instance: kubernetes-dashboard
  name: dashboard
  namespace: kubernetes-dashboard
spec:
  ingressClassName: nginx
  rules:
  - host: # replace with host name
    http:
      paths:
      - backend:
          service:
            name: kubernetes-dashboard
            port:
              number: 443
        path: /
        pathType: ImplementationSpecific

extensions/v1beta1

Attention

Deprecated Api Version

kind: Ingress
apiVersion: extensions/v1beta1
metadata:
  name: replace_me
  namespace: replace_me
spec:
  rules:
    - host: replace_me
      http:
        paths:
          - pathType: ImplementationSpecific
            backend:
              serviceName: replace_me
              servicePort: 5601 

Nginx Ingress HTTPS backend

1
2
3
4
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/backend-protocol: HTTPS
    nginx.ingress.kubernetes.io/proxy-body-size: 100m

Last update: May 19, 2022
Back to top