Kubernetes

Sebuah obyek API yang mengatur akses eksternal terhadap Service yang ada di dalam klaster, biasanya dalam bentuk request HTTP.

Ingress juga menyediakan load balancing, terminasi SSL, serta name-based virtual hosting

Contoh konfigurasi Ingress dengan backend https

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: dashboard-ingress
  namespace: kube-system
  labels:
    app: dashboard-app
  annotations:
    nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
spec:
  rules:
  - host: example.mauonline.my.id
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: kubernetes-dashboard
            port:
              number: 443

Contoh ingress dengan backend http

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: dashboard-ingress
  namespace: kube-system
  labels:
    app: dashboard-app
spec:
  rules:
  - host: example.mauonline.my.id
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: kubernetes-dashboard
            port:
              number: 80

Leave a Reply

Your email address will not be published. Required fields are marked *