Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is the Kubernetes dashboard?
The Kubernetes dashboard is a web-based user interface that allows you to manage and monitor your Kubernetes clusters easily without using command-line tools.
Click to reveal answer
beginner
How do you access the Kubernetes dashboard securely?
You access the Kubernetes dashboard securely by creating a proxy with the command kubectl proxy and then opening the dashboard URL http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/ in your browser.
Click to reveal answer
intermediate
What is the purpose of a Service Account in the Kubernetes dashboard?
A Service Account provides the dashboard with permissions to access cluster resources. It defines what the dashboard can see and do inside the cluster.
Click to reveal answer
beginner
Which command installs the Kubernetes dashboard in your cluster?
You install the Kubernetes dashboard using: kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml.
Click to reveal answer
intermediate
Why should you use Role-Based Access Control (RBAC) with the Kubernetes dashboard?
RBAC controls who can access the dashboard and what actions they can perform, helping to keep your cluster secure by limiting permissions.
Click to reveal answer
What is the main function of the Kubernetes dashboard?
AMonitor network traffic only
BProvide a web interface to manage Kubernetes clusters
CStore container images
DReplace kubectl command-line tool
✗ Incorrect
The Kubernetes dashboard provides a web interface to manage and monitor Kubernetes clusters easily.
Which command starts a proxy to access the Kubernetes dashboard locally?
Akubectl proxy
Bkubectl dashboard start
Ckubectl run proxy
Dkubectl access dashboard
✗ Incorrect
The command kubectl proxy creates a secure tunnel to access the dashboard locally.
What does a Service Account do for the Kubernetes dashboard?
ARuns the dashboard server
BStores dashboard configuration files
CDefines dashboard permissions in the cluster
DManages container images
✗ Incorrect
A Service Account defines what the dashboard can access and do inside the Kubernetes cluster.
2. Which command correctly installs the Kubernetes dashboard?
easy
A. kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml
B. kubectl create dashboard
C. kubectl run dashboard --image=kubernetes/dashboard
D. kubectl install dashboard
Solution
Step 1: Identify the installation method for the dashboard
The official way to install the Kubernetes dashboard is by applying the recommended YAML manifest from the official GitHub repository.
Step 2: Verify the command syntax
kubectl apply -f [URL] is the correct syntax to apply a manifest file from a URL.
Final Answer:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml -> Option A
Quick Check:
Install dashboard = kubectl apply -f URL [OK]
Hint: Use kubectl apply with official dashboard YAML URL [OK]
Common Mistakes:
Using kubectl create instead of apply
Trying kubectl run which is for pods
Using non-existent kubectl install command
3. After running kubectl proxy, what URL should you open in your browser to access the Kubernetes dashboard?
medium
A. http://localhost:8080/dashboard
B. http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
C. https://dashboard.kubernetes.local
D. http://127.0.0.1:6443/dashboard
Solution
Step 1: Understand kubectl proxy behavior
Running kubectl proxy creates a local proxy on port 8001 that forwards requests to the Kubernetes API server.
Step 2: Identify the dashboard proxy URL
The dashboard is accessed via the API server proxy path: /api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/ on localhost port 8001.
Final Answer:
http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/ -> Option B
Quick Check:
Dashboard URL after proxy = localhost:8001/api/v1/... [OK]
Hint: Dashboard URL uses kubectl proxy on localhost:8001 [OK]
Common Mistakes:
Using wrong port like 8080 or 6443
Trying HTTPS without proxy
Using a made-up domain name
4. You installed the Kubernetes dashboard but get a 403 Forbidden error when accessing it. What is the most likely cause?
medium
A. You did not create a login token or proper access permissions
B. The dashboard service is not running
C. kubectl proxy is not installed
D. Your browser does not support HTTPS
Solution
Step 1: Understand 403 Forbidden meaning
A 403 error means access is denied due to lack of permissions or authentication.
Step 2: Check dashboard access requirements
The dashboard requires a valid login token with proper RBAC permissions to allow access.
Final Answer:
You did not create a login token or proper access permissions -> Option A
Quick Check:
403 Forbidden = missing token or permissions [OK]
Hint: 403 means missing token or permissions [OK]
Common Mistakes:
Assuming service is not running without checking
Thinking kubectl proxy is missing (it's a client tool)
Blaming browser HTTPS support
5. You want to securely access the Kubernetes dashboard remotely without exposing it publicly. Which approach is best?
hard
A. Expose the dashboard service with a LoadBalancer type service
B. Disable authentication on the dashboard for easy access
C. Use kubectl proxy on your local machine and SSH tunnel to the cluster
D. Access the dashboard directly via the cluster IP from anywhere
Solution
Step 1: Consider security for remote access
Exposing the dashboard publicly or disabling authentication is insecure and not recommended.
Step 2: Use kubectl proxy with SSH tunneling
Running kubectl proxy locally and creating an SSH tunnel to the cluster securely forwards traffic without exposing the dashboard publicly.
Final Answer:
Use kubectl proxy on your local machine and SSH tunnel to the cluster -> Option C