Skip to content

lucperkins/ezk8sclient

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

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