0
0
Kubernetesdevops~5 mins

Ingress annotations for customization in Kubernetes - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of annotations in a Kubernetes Ingress resource?
Annotations add extra settings or instructions to customize how the Ingress controller handles traffic, like enabling SSL or setting timeouts.
Click to reveal answer
beginner
How do you specify an annotation in a Kubernetes Ingress YAML file?
Under the metadata section, use the 'annotations' field with key-value pairs, for example:<br>
metadata:<br>  annotations:<br>    nginx.ingress.kubernetes.io/rewrite-target: /
Click to reveal answer
beginner
Name one common annotation used to enable HTTPS redirect in NGINX Ingress.
The annotation 'nginx.ingress.kubernetes.io/ssl-redirect: "true"' forces HTTP requests to redirect to HTTPS.
Click to reveal answer
intermediate
What does the annotation 'nginx.ingress.kubernetes.io/proxy-read-timeout' control?
It sets how long the NGINX Ingress controller waits for a response from the backend service before timing out.
Click to reveal answer
advanced
Why might you use the annotation 'nginx.ingress.kubernetes.io/configuration-snippet'?
To add custom NGINX configuration snippets directly into the Ingress, allowing advanced tweaks not covered by standard annotations.
Click to reveal answer
Where do you place annotations in a Kubernetes Ingress manifest?
AUnder spec
BUnder status
CUnder metadata
DUnder containers
Which annotation enables HTTPS redirect in NGINX Ingress?
Anginx.ingress.kubernetes.io/proxy-read-timeout: "30"
Bnginx.ingress.kubernetes.io/rewrite-target: /
Cnginx.ingress.kubernetes.io/configuration-snippet
Dnginx.ingress.kubernetes.io/ssl-redirect: "true"
What does 'nginx.ingress.kubernetes.io/rewrite-target' do?
ASets the backend service port
BChanges the URL path before forwarding to backend
CDefines the TLS secret name
DSpecifies the Ingress class
If you want to increase the timeout waiting for backend response, which annotation is used?
Anginx.ingress.kubernetes.io/proxy-read-timeout
Bnginx.ingress.kubernetes.io/ssl-redirect
Cnginx.ingress.kubernetes.io/rewrite-target
Dnginx.ingress.kubernetes.io/configuration-snippet
Can annotations be used to add custom NGINX config snippets in Ingress?
AYes, using nginx.ingress.kubernetes.io/configuration-snippet
BNo, annotations cannot customize NGINX
COnly by editing the NGINX config file directly
DOnly through ConfigMaps
Explain how annotations customize the behavior of a Kubernetes Ingress controller.
Think about how you add special instructions to a recipe.
You got /4 concepts.
    List and describe three common NGINX Ingress annotations and their effects.
    Focus on security, URL handling, and timeout settings.
    You got /3 concepts.