Skip to main content

Loadbalancer-cli

You can edit an ingress by kubectl of in rancher.

  1. first get the correct ingress
kubectl get ingress -n namespace
  1. edit the ingress
kubectl edit ingress name -n namespace
  1. add the annotation
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/proxy-connect-timeout: "360"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "360"
  generation: 1
  labels:
  name: example.web.rug.nl
  namespace: default
spec:
  ingressClassName: nginx
  rules:
  - host: example.web.rug.nl
    http:
      paths:
      - backend:
          service:
            name: example
            port:
              number: 80
        path: /
        pathType: Prefix
  tls:
  - hosts:
    - example.web.rug.nl

whitelist

To allow only the RUG IP or range to the deployment you can use the folowing annotation :

nginx.ingress.kubernetes.io/whitelist-source-range: 129.125.0.0/16

upload size

The default upload size is 2m

To increase the upload

nginx.ingress.kubernetes.io/proxy-body-size: 8m

For more examples see :

https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/