Certified Kubernetes Application Developer (CKAD) Practice Test

Question: 1 / 400

Does a NodePort service support session affinity?

No

Yes, but only with additional configuration

Yes

A NodePort service does support session affinity, which is often referred to as sticky sessions. This feature allows clients to be directed to the same backend pod during their session based on the configuration of the service. When enabled, session affinity ensures that all requests from the same client (identified through cookies or IP addresses) will be routed to the same backend pod, providing a consistent user experience.

This capability is particularly useful for applications that maintain state across multiple requests, as it helps in maintaining the user's session without requiring the session data to be stored in a centralized location. In Kubernetes, enabling session affinity is typically accomplished by setting the `sessionAffinity` field of the service to `ClientIP`. As a result, NodePort services can effectively manage sessions and enhance performance when configuration is appropriately applied.

Options suggesting that session affinity does not exist at all, requires additional configuration, or depends on the backend service do not fully recognize the built-in capabilities of Kubernetes NodePort services to handle session affinity.

Get further explanation with Examzify DeepDiveBeta

It depends on the backend service

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy