diff --git a/README.md b/README.md index 91e9bf9..e9a3007 100644 --- a/README.md +++ b/README.md @@ -170,3 +170,18 @@ Skbn uses `AZURE_STORAGE_ACCOUNT` and `AZURE_STORAGE_ACCESS_KEY` environment var 1. [In-cluster example](/examples/in-cluster) 2. [Code example](/examples/code) + +## Troubleshooting + +### Auth Plugin issue + +It may happens when skbn try to authenticate to K8S cluster. You get the following error: + +``` +No Auth Provider found for name "XXX" +``` +When XXX may be: azure, gcp, oidc... + +To solve it, you have to uncomment the import of plugin that you need on `pkg/skbn/kube.go` + +Finally, build the project and it should work. \ No newline at end of file diff --git a/pkg/skbn/kube.go b/pkg/skbn/kube.go index 61110ef..3be50f3 100644 --- a/pkg/skbn/kube.go +++ b/pkg/skbn/kube.go @@ -16,6 +16,15 @@ import ( "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" "k8s.io/client-go/tools/remotecommand" + // + // Uncomment to load all auth plugins + // _ "k8s.io/client-go/plugin/pkg/client/auth" + // + // Or uncomment to load specific auth plugins + // _ "k8s.io/client-go/plugin/pkg/client/auth/azure" + // _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" + // _ "k8s.io/client-go/plugin/pkg/client/auth/oidc" + // _ "k8s.io/client-go/plugin/pkg/client/auth/openstack" ) // K8sClient holds a clientset and a config