Jump to content

Kubernetes: Difference between revisions

295 bytes added ,  19 February 2022
Line 329: Line 329:
</syntaxhighlight>
</syntaxhighlight>
}}
}}
To set settings per-ingress, add the following to your ingress definition:
To set settings per-ingress, add the annotation to your ingress definition:
{{hidden | example ingress |
{{hidden | example ingress |
<syntaxhighlight lang="yaml">
<syntaxhighlight lang="yaml">
Line 337: Line 337:
   name: nextcloud
   name: nextcloud
   annotations:
   annotations:
    cert-manager.io/issuer: letsencrypt-prod
     nginx.ingress.kubernetes.io/proxy-body-size: 10g
     nginx.ingress.kubernetes.io/proxy-body-size: 10g
spec:
spec:
  tls:
    - secretName: cloud-davidl-me-tls
      hosts:
        - cloud.davidl.me
   rules:
   rules:
  - host: "cloud.davidl.me"
    - host: cloud.davidl.me
    http:
      http:
      paths:
        paths:
      - path: /
          - path: /
        pathType: Prefix
            pathType: Prefix
        backend:
            backend:
          service:
              service:
            name: nextcloud-app-service
                name: nextcloud-app-service
            port:
                port:
              number: 80
                  number: 80
</syntaxhighlight>
</syntaxhighlight>
}}
}}
If your backend uses HTTPS, you will need to add the annotation: <code>nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"</code>


==Autoscaling==
==Autoscaling==