Complete the command to start the Kubernetes dashboard proxy.
kubectl [1] proxyThe kubectl proxy command starts a proxy server to access the Kubernetes dashboard locally.
Complete the command to deploy the Kubernetes dashboard using the official YAML file.
kubectl apply -f [1]The official Kubernetes dashboard is deployed using the recommended YAML file from the official GitHub URL.
Fix the error in the command to get the dashboard login token for the 'kubernetes-dashboard' service account in the 'kubernetes-dashboard' namespace.
kubectl -n kubernetes-dashboard get secret [1] -o go-template='{{.data.token | base64decode}}'
The secret name is dynamic and must be retrieved from the service account first using jsonpath. The command substitution $(kubectl ...) gets the correct secret name.
Fill both blanks to create a ClusterRoleBinding named 'dashboard-admin' that binds the 'cluster-admin' role to the 'kubernetes-dashboard' service account in the 'kubernetes-dashboard' namespace.
kubectl create clusterrolebinding dashboard-admin --clusterrole=[1] --serviceaccount=[2]
The cluster-admin role grants full cluster permissions. The service account is specified as namespace:name, here kubernetes-dashboard:kubernetes-dashboard.
Fill all three blanks to create a dictionary comprehension that maps pod names to their status phase for pods in the 'kubernetes-dashboard' namespace where the phase is 'Running'.
pods_status = { [1]: pod.status.phase for pod in [3].items if pod.status.phase == '[2]' }The dictionary comprehension uses pod.metadata.name as the key, filters pods with phase 'Running', and iterates over pods.items.