Kubernetes Cloud Native Associate (KCNA) Certification 1 Practice Test

Access More Questions
What does the command 'kubectl expose' do in Kubernetes?
Correct Answer:
Exposes a Kubernetes deployment as a service
Explanation:
Exposing a deployment by creating a Service object is what this command does. It takes the specified resource (like a Deployment) and creates a Service that selects the pods with the matching labels, giving them a stable network endpoint inside the cluster. By default, this creates a ClusterIP service, which is reachable from within the cluster only; you can make it accessible outside the cluster by choosing a different type, such as NodePort or LoadBalancer. This operation does not change the number of replicas, delete resources, or scale the deployment.

Access more questions from this quiz

Continue to Kubernetes Cloud Native Associate (KCNA) Certification 1 Practice Test for more practice questions and the full quiz experience.

Access More Questions