Skip to content
Go to file
Cannot retrieve contributors at this time
20 lines (17 sloc) 518 Bytes
package kube
import (
// ClientSet returns the production Kubernetes clientSet
func ClientSet() (kubernetes.Interface, error) {
log.Print("[Info][Kubernetes] Connecting to Kubernetes API...")
config, err := rest.InClusterConfig()
if err != nil {
return nil, errors.Wrap(err, "Could not connect to Kubernetes API")
log.Print("[Info][Kubernetes] Connected to Kubernetes API")
return kubernetes.NewForConfig(config)
You can’t perform that action at this time.