go-k8s-client

command module
v0.0.0-...-447755d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2022 License: MIT Imports: 8 Imported by: 0

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL