0
0
Kubernetesdevops~10 mins

Ingress annotations for customization in Kubernetes - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to add an annotation that sets the ingress class to nginx.

Kubernetes
metadata:
  annotations:
    kubernetes.io/ingress.class: [1]
Drag options to blanks, or click blank then click option'
Anginx
Bapache
Cistio
Dhaproxy
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong ingress class name like 'apache' or 'istio'.
Forgetting to add the annotation under metadata.
2fill in blank
medium

Complete the code to add an annotation that enables SSL redirect for the ingress.

Kubernetes
metadata:
  annotations:
    nginx.ingress.kubernetes.io/[1]: "true"
Drag options to blanks, or click blank then click option'
Assl-passthrough
Bforce-ssl
Cssl-redirect
Denable-ssl
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'ssl-passthrough' which is different and disables redirect.
Misspelling the annotation key.
3fill in blank
hard

Fix the error in the annotation key to correctly set the rewrite target.

Kubernetes
metadata:
  annotations:
    nginx.ingress.kubernetes.io/[1]: "/"
Drag options to blanks, or click blank then click option'
Arewrite_target
Brewrite-target
CrewriteTarget
Drewrite-targets
Attempts:
3 left
💡 Hint
Common Mistakes
Using underscores instead of hyphens.
Using camelCase instead of hyphenated lowercase.
4fill in blank
hard

Fill both blanks to add annotations that enable gzip compression and set a custom proxy body size limit.

Kubernetes
metadata:
  annotations:
    nginx.ingress.kubernetes.io/[1]: "true"
    nginx.ingress.kubernetes.io/[2]: "10m"
Drag options to blanks, or click blank then click option'
Aenable-gzip
Bproxy-body-size
Cproxy-body-size-limit
Dgzip
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'enable-gzip' instead of 'gzip'.
Using 'proxy-body-size-limit' which is not a valid annotation.
5fill in blank
hard

Fill all three blanks to add annotations that set a custom client max body size, enable rewrite, and disable SSL redirect.

Kubernetes
metadata:
  annotations:
    nginx.ingress.kubernetes.io/[1]: "5m"
    nginx.ingress.kubernetes.io/[2]: "/newpath"
    nginx.ingress.kubernetes.io/[3]: "false"
Drag options to blanks, or click blank then click option'
Aclient-max-body-size
Brewrite-target
Cssl-redirect
Dproxy-body-size
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing 'client-max-body-size' with 'proxy-body-size'.
Setting 'ssl-redirect' to true instead of false.
Using wrong annotation keys or misspelling.