package k8sClient
import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
)
func Newk8sClient() (client *kubernetes.Clientset, err error) {
// creates the in-cluster config
config, err := rest.InClusterConfig()
if err != nil {
panic(err.Error())
}
// creates the clientset
client, err = kubernetes.NewForConfig(config)
if err != nil {
panic(err.Error())
}
return client, nil
}
-
Matthew Slipper authored
- Adopts Go workspaces for future compatibility with the Bedrock move into the monorepo - Moves Go packages to the root of the repo in order to fix import paths - Rewrites existing Go import paths - Removes Stackman, since it's not needed anymore Co-authored-by:
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
5d309e6a