Kubectl config view gives empty results

1/22/2020

configuration is stored in ~/.kube/config. But when i use the below command it gives empty results. kubectl config view

Output:

apiVersion: v1
clusters: []
contexts: []
current-context: ""
kind: Config
preferences: {}
users: []
-- Abhishek Parmar
azure-aks
azure-kubernetes
kubectl
kubernetes

1 Answer

1/22/2020
  • Just to make sure, try running kubectl config view --kubeconfig <PATH_TO_YOUR_CONFIG_FILE>.
  • Make sure your $KUBECONFIG is empty, (or that it points at ~/.kube/config).
  • If you installed kubectl via snap it might possibly be a sand-boxing issue.
-- Latiif alSharif
Source: StackOverflow