Install NGINX Ingress ControllerβοΈ
Inspect the prerequisites and the main steps to perform for installing Install NGINX Ingress Controller on Kubernetes.
PrerequisitesβοΈ
- Kubectl version 1.23.0 is installed. Please refer to the Kubernetes official website for details.
- Helm version 3.10.2 is installed. Please refer to the Helm page on GitHub for details.
InstallationβοΈ
To install the ingress-nginx chart, follow the steps below:
-
Create an ingress-nginx namespace:
kubectl create namespace ingress-nginx
-
Add a chart repository:
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx helm repo update
-
Install the ingress-nginx chart:
helm install ingress ingress-nginx/ingress-nginx \ --version 4.7.0 \ --values values.yaml \ --namespace ingress-nginx
Check out the values.yaml file sample of the ingress-nginx chart customization:
View: values.yaml
controller:
addHeaders:
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
resources:
limits:
memory: "256Mi"
requests:
cpu: "50m"
memory: "128M"
config:
ssl-redirect: 'true'
client-header-buffer-size: '64k'
http2-max-field-size: '64k'
http2-max-header-size: '64k'
large-client-header-buffers: '4 64k'
upstream-keepalive-timeout: '120'
keep-alive: '10'
use-forwarded-headers: 'true'
proxy-real-ip-cidr: '172.32.0.0/16'
proxy-buffer-size: '8k'
# To watch Ingress objects without the ingressClassName field set parameter value to true.
# https://kubernetes.github.io/ingress-nginx/#i-have-only-one-ingress-controller-in-my-cluster-what-should-i-do
watchIngressWithoutClass: true
service:
type: NodePort
nodePorts:
http: 32080
https: 32443
updateStrategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate
metrics:
enabled: true
defaultBackend:
enabled: true
serviceAccount:
create: true
name: nginx-ingress-service-account
Warning
Align value controller.config.proxy-real-ip-cidr with AWS VPC CIDR.
Note
It is also possible to install the ingress controller via cluster add-ons. For details, please refer to the Install via Add-Ons page.