I have been playing around with AKS a bit now and recently came across the ability to disable the Kubernetes dashboard in AKS using the preview extension. I am not too sure when the CLI extension will be out of preview, but I am sure the same command will work.
If like me, you only use the CLI to manage Kubernetes and you want to remove what some say is a security issue then this command is for you.
The command
1 |
az aks disable-addons --addons kube-dashboard --resource-group pixel-aks--name pixel-aks --verbose |
Just make sure you change the command to your resource group and your AKS name.
But wait!
But before we run the command, let’s have a look at the kube-system namespace.
If you are not sure how to do that then use the following command.
1 |
kubectl get deployments --namespace kube-system |

As you can see we have a deployment called kubernetes-dashboard.
If you then run the first command to disable the dashboard.
Now, if you run the kubectl get command again you will see the deployment kubernetes-dashboard has gone.

Oh no, I need the dashboard after all
No fear, you can easily add the dashboard back by using the following command.
1 |
az aks enable-addons --addons kube-dashboard --resource-group pixel-aks--name pixel-aks --verbose |
After that command completes you will have the dashboard back!
All in all
I hope you found this article helpful. I think this is a cool new feature that is coming to AKS. And can be a good way to help you manage kubernetes addons like the Azure monitoring agent.
If you have any questions please reach out.
0 Comments