To fix the error, verify kubectl configuration to see if kubectl is correctly configured to access your cluster using:
kubectl cluster-info dump