Question 924 of 997
Cluster Setup and HardeninghardMultiple SelectObjective-mapped

Restrict Kubernetes Dashboard Access: Best Practices

This CKS practice question tests your understanding of cluster setup and hardening. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Which THREE of the following are valid methods to restrict access to the Kubernetes Dashboard? (Choose three.)

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use a ClusterIP service and only allow access via kubectl proxy

Option A is correct because using a ClusterIP service restricts the Dashboard to internal cluster access only. Access is then granted exclusively through `kubectl proxy`, which creates a local proxy server that authenticates the user via their kubeconfig context, ensuring that only authenticated and authorized users can reach the Dashboard without exposing it to the network.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use a ClusterIP service and only allow access via kubectl proxy

    Why this is correct

    By using a ClusterIP service and kubectl proxy, access is limited to users who have kubectl and cluster access.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Expose the Dashboard via a NodePort service to the internet

    Why it's wrong here

    Exposing the Dashboard via NodePort without additional security controls would expose it publicly, which is insecure.

  • Use an Ingress with authentication and TLS

    Why this is correct

    Ingress can be configured with authentication (e.g., basic auth, OAuth) and TLS to secure access to the Dashboard.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Apply RBAC policies that restrict who can access the Dashboard

    Why this is correct

    RBAC can be used to limit which users or service accounts have permission to access the Dashboard resources.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Deploy the Dashboard with a hostNetwork: true configuration

    Why it's wrong here

    Using hostNetwork would make the Dashboard accessible on the host network, potentially exposing it more widely.

Common exam traps

Common exam trap: answer the scenario, not the keyword

CNCF often tests the misconception that exposing a service via NodePort or hostNetwork is acceptable for internal-only access, when in fact both methods inherently expose the service to the node's network and require additional security measures to restrict access.

Detailed technical explanation

How to think about this question

The `kubectl proxy` command creates an HTTP proxy between the local machine and the Kubernetes API server, using the client's kubeconfig credentials for authentication and authorization. When accessing the Dashboard via this proxy, all requests are subject to RBAC policies enforced by the API server, and the proxy itself can be further secured with `--accept-hosts` and `--address` flags to limit which hosts can connect. In a real-world scenario, this method is often combined with a bastion host or VPN to ensure only trusted administrators can initiate the proxy session.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A practitioner preparing for the CKS exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related CKS practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free CKS practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this CKS question test?

Cluster Setup and Hardening — This question tests Cluster Setup and Hardening — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Use a ClusterIP service and only allow access via kubectl proxy — Option A is correct because using a ClusterIP service restricts the Dashboard to internal cluster access only. Access is then granted exclusively through `kubectl proxy`, which creates a local proxy server that authenticates the user via their kubeconfig context, ensuring that only authenticated and authorized users can reach the Dashboard without exposing it to the network.

What should I do if I get this CKS question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 more ways this is tested on CKS

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. You want to ensure that the Kubernetes Dashboard is accessed only by authenticated users with specific permissions. What is the BEST approach?

medium
  • A.Expose Dashboard via NodePort and rely on network firewalls
  • B.Create a ClusterRoleBinding granting cluster-admin to all service accounts
  • C.Set Dashboard to use HTTP instead of HTTPS
  • D.Use an ingress with authentication, and create RBAC roles for Dashboard users

Why D: Option D is correct because the Kubernetes Dashboard should be secured using an Ingress controller with authentication (e.g., OIDC, basic auth, or client certificate) combined with fine-grained RBAC roles to restrict what each authenticated user can do. This ensures that only authorized users with specific permissions can access the Dashboard, following the principle of least privilege and cluster hardening best practices.

Variation 2. A security scanner reports that the Kubernetes dashboard is publicly accessible. Which recommended action should be taken?

hard
  • A.Expose the dashboard as a NodePort service for easy access
  • B.Configure firewall rules to restrict access to the dashboard's ClusterIP
  • C.Enable authentication on the dashboard
  • D.Delete the dashboard deployment and use kubectl proxy to access it

Why D: The Kubernetes Dashboard is a powerful administrative tool that should never be exposed to the public internet. Deleting the dashboard deployment and using `kubectl proxy` to access it locally is the recommended action because it eliminates the attack surface entirely and ensures that access is restricted to the machine running the kubectl command, leveraging the API server's built-in authentication and authorization.

Keep practising

More CKS practice questions

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This CKS practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKS exam.