Skip to content

lucperkins/ezk8sclient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ezk8sclient

The easiest Go client for the Kubernetes API. ezk8sclient enables you to very quickly create a "default" client for the Kubernetes API:

import "github.com/lucperkins/ezk8sclient"

client, err := NewClient()

Ordinarily you'd have to do this:

import (
	"k8s.io/cli-runtime/pkg/genericclioptions"
	"k8s.io/client-go/kubernetes"
)

flags := genericclioptions.NewConfigFlags()
restConfig, err := flags.ToRESTConfig()
if err != nil {
        return nil, err
}

client, err := kubernetes.NewForConfig(restConfig)
if err != nil {
        return nil, err
}

Just a quick time saver for y'all.

About

The easiest Go client for the Kubernetes API

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages