Complete the code to add an annotation that sets the ingress class to nginx.
metadata:
annotations:
kubernetes.io/ingress.class: [1]The annotation kubernetes.io/ingress.class with value nginx tells Kubernetes to use the NGINX ingress controller for this ingress resource.
Complete the code to add an annotation that enables SSL redirect for the ingress.
metadata:
annotations:
nginx.ingress.kubernetes.io/[1]: "true"The annotation nginx.ingress.kubernetes.io/ssl-redirect set to true tells the NGINX ingress controller to redirect HTTP traffic to HTTPS.
Fix the error in the annotation key to correctly set the rewrite target.
metadata:
annotations:
nginx.ingress.kubernetes.io/[1]: "/"The correct annotation key to set the rewrite target is nginx.ingress.kubernetes.io/rewrite-target. It uses hyphens, not underscores or camelCase.
Fill both blanks to add annotations that enable gzip compression and set a custom proxy body size limit.
metadata:
annotations:
nginx.ingress.kubernetes.io/[1]: "true"
nginx.ingress.kubernetes.io/[2]: "10m"The annotation nginx.ingress.kubernetes.io/gzip enables gzip compression. The annotation nginx.ingress.kubernetes.io/proxy-body-size sets the maximum allowed size of the client request body.
Fill all three blanks to add annotations that set a custom client max body size, enable rewrite, and disable SSL redirect.
metadata:
annotations:
nginx.ingress.kubernetes.io/[1]: "5m"
nginx.ingress.kubernetes.io/[2]: "/newpath"
nginx.ingress.kubernetes.io/[3]: "false"The annotation proxy-body-size sets the max client body size. rewrite-target sets the path to rewrite to. ssl-redirect set to false disables automatic HTTP to HTTPS redirect.