Skip to content

Commit fd11d69

Browse files
Add default namespace to kubeadvisor command
The first command creates a resource in the "default" namespace, but the second command can fail because it assumes the default namespace is selected in the user's current context. This change ensures the second command doesn't fail.
1 parent 5416cf9 commit fd11d69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

articles/aks/kube-advisor-tool.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ To run the tool on a cluster that is configured for [role-based access control (
2828
```bash
2929
kubectl apply -f https://raw.githubusercontent.com/Azure/kube-advisor/master/sa.yaml
3030

31-
kubectl run --rm -i -t kubeadvisor --image=mcr.microsoft.com/aks/kubeadvisor --restart=Never --overrides="{ \"apiVersion\": \"v1\", \"spec\": { \"serviceAccountName\": \"kube-advisor\" } }"
31+
kubectl run --rm -i -t kubeadvisor --image=mcr.microsoft.com/aks/kubeadvisor --restart=Never --overrides="{ \"apiVersion\": \"v1\", \"spec\": { \"serviceAccountName\": \"kube-advisor\" } }" --namespace default
3232
```
3333

3434
If you aren't using RBAC, you can run the command as follows:
@@ -69,4 +69,4 @@ If you are running the tool against a cluster that is not RBAC-enabled, no clean
6969

7070
[kube-cpumem]: https://github.com/Azure/azure-quickstart-templates
7171
[kube-advisor-github]: https://github.com/azure/kube-advisor
72-
[k8s-node-selector]: concepts-clusters-workloads.md#node-selectors
72+
[k8s-node-selector]: concepts-clusters-workloads.md#node-selectors

0 commit comments

Comments
 (0)