Jump to content

Kubernetes: Difference between revisions

305 bytes added ,  19 February 2022
Line 278: Line 278:
See [https://kubernetes.github.io/ingress-nginx/deploy/ ingress-nginx] to deploy an ingress controller.
See [https://kubernetes.github.io/ingress-nginx/deploy/ ingress-nginx] to deploy an ingress controller.


Note that global Nginx settings are set in the configmap.<br>
Personally, I have:
Personally, I have:
{{hidden | configmap |
{{hidden | values.yaml |
<syntaxhighlight lang="yaml">
<syntaxhighlight lang="yaml">
# Source: ingress-nginx/templates/controller-configmap.yaml
controller:
apiVersion: v1
  watchIngressWithoutClass: true
kind: ConfigMap
  autoscaling:
metadata:
    enabled: true
   labels:
    minReplicas: 1
     helm.sh/chart: ingress-nginx-4.0.0-beta.3
    maxReplicas: 5
     app.kubernetes.io/name: ingress-nginx
    targetCPUUtilizationPercentage: 50
     app.kubernetes.io/instance: ingress-nginx
    targetMemoryUtilizationPercentage: 50
     app.kubernetes.io/version: 1.0.0-beta.3
    behavior: {}
     app.kubernetes.io/managed-by: Helm
 
    app.kubernetes.io/component: controller
   service:
  name: ingress-nginx-controller
    enabled: true
   namespace: ingress-nginx
    appProtocol: true
data:
 
   proxy-body-size: 1g
    annotations: {}
   use-forwarded-headers: "true" # True because we're behind another reverse proxy
    labels: {}
    externalIPs: []
 
     enableHttp: true
    enableHttps: true
 
    ports:
      http: 80
      https: 443
 
     targetPorts:
      http: http
      https: https
 
     type: LoadBalancer
     loadBalancerIP: 192.168.1.3
 
  config:
     proxy-body-size: 1g
</syntaxhighlight>
}}
{{hidden | upgrade.sh |
<syntaxhighlight lang="bash">
#!/bin/bash
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
cd "${DIR}" || exit
 
helm upgrade --install ingress-nginx ingress-nginx \
   --repo https://kubernetes.github.io/ingress-nginx \
   --namespace ingress-nginx --create-namespace \
   -f values.yaml
</syntaxhighlight>
</syntaxhighlight>
}}
}}