Answer the question
In order to leave comments, you need to log in
Does the config for nginx-ingress-controller update itself?
Hello everyone,
do I understand correctly that in most cases the cluster admin does not need to edit nginx.conf, since it is updated automatically from the ingress resource itself? Those. in a properly configured cluster, as soon as we add a new service to the system (for example, we did kubectl expose deployment... ), then it is picked up by the ingress resource, does the cat add the appropriate entry to the nginx-ingress-controller configuration (for example, to the nginx.conf file)?
Can you explain the process and what controls it!
all the beaver and kindness)
Vadim
Answer the question
In order to leave comments, you need to log in
don't understand correctly.
ingress is a separate service and it needs to be told that other services have appeared that need to be serviced. but the config itself does not need to be edited, this is a normal deployment. example below. just an example, from the basic course about k8s
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: nginx-ingress-controller
spec:
replicas: 1
revisionHistoryLimit: 3
template:
metadata:
labels:
app: nginx-ingress-lb
spec:
terminationGracePeriodSeconds: 60
serviceAccount: nginx
containers:
- name: nginx-ingress-controller
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.9.0
imagePullPolicy: Always
readinessProbe:
httpGet:
path: /healthz
port: 10254
scheme: HTTP
livenessProbe:
httpGet:
path: /healthz
port: 10254
scheme: HTTP
initialDelaySeconds: 10
timeoutSeconds: 5
args:
- /nginx-ingress-controller
- --default-backend-service=$(POD_NAMESPACE)/default-backend
- --configmap=$(POD_NAMESPACE)/nginx-ingress-controller-conf
- --v=2
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
ports:
- containerPort: 80
- containerPort: 18080
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question