Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/felipeagger/go-k8s-client

Golang managing resources in kubernetes
https://github.com/felipeagger/go-k8s-client

Last synced: about 1 month ago
JSON representation

Golang managing resources in kubernetes

Awesome Lists containing this project

README

        

# go-k8s-client
Golang managing resources in kubernetes

List Nodes, Pods.. Create & Delete Pods, Jobs...

# Requirements

Add k8s config file in root directory as "kube_config.yml":

```
apiVersion: v1
kind: Config
clusters:
- cluster:
api-version: v1
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t...tLS0K
server: "https://192.168.100.50:6443"
name: "local"
contexts:
- context:
cluster: "local"
user: "kube-admin-local"
name: "local"
current-context: "local"
users:
- name: "kube-admin-local"
user:
client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQlNREV3TWpReE5ERXpNV....UtLS0tLQo=
client-key-data: LS0tLS1CRUdJTiBSU0EgUFJJ......==
```

# Running:

```
go run main.go
```