Question 14
Domain 3: Services & NetworkingWhich Kubernetes resource and configuration are used to enable HTTP/HTTPS path-based routing with TLS termination for classic Ingress?
Correct answer: A
Explanation
A "networking.k8s.io/v1 Ingress" defines HTTP/HTTPS routing rules to backend Services, including "path/host rules" for path-based routing. TLS termination is enabled by adding a "TLS section," and the Ingress must use the proper "IngressClass" so the matching controller processes it.
Why each option is right or wrong
A. Create a networking.k8s.io/v1 Ingress resource that references Services, includes path/host rules, specifies a TLS section, and uses the correct IngressClass
Under the Kubernetes API, classic HTTP/HTTPS routing is implemented with a `networking.k8s.io/v1` `Ingress` object, which defines `spec.rules[].host` and `spec.rules[].http.paths[]` to map request paths to backend `Service` ports. TLS termination is configured in `spec.tls` by listing the hostnames and the referenced secret containing the certificate, and the object must be associated with the correct controller via `spec.ingressClassName` so the intended IngressClass processes it.
B. Create a Pod with hostNetwork: true and expose it with a ClusterIP Service
C. Create a NetworkPolicy that allows port 80/443 traffic to the backend Pods
D. Create a StatefulSet with an external IP and mount the TLS certificate into the container