Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lucperkins/ezk8sclient
The easiest Go client for the Kubernetes API
https://github.com/lucperkins/ezk8sclient
Last synced: about 1 month ago
JSON representation
The easiest Go client for the Kubernetes API
- Host: GitHub
- URL: https://github.com/lucperkins/ezk8sclient
- Owner: lucperkins
- Created: 2019-05-30T04:24:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-04T02:02:21.000Z (over 4 years ago)
- Last Synced: 2024-11-14T01:15:44.086Z (2 months ago)
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ezk8sclient
The easiest Go client for the Kubernetes API. ezk8sclient enables you to very quickly create a "default" client for the Kubernetes API:
```go
import "github.com/lucperkins/ezk8sclient"client, err := NewClient()
```Ordinarily you'd have to do this:
```go
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.