/k8s-client

Primary LanguageGoApache License 2.0Apache-2.0

k8s-client -- simple Kubernetes client for listing / listening to Kubernetes events

A simple standalone Kubernetes client based on Go client for Kubernetes.

Its purpose is to serve as scaffolding code for:

  • Discovering server API capabilities: Listing API constructs

  • Listing Kubernetes constructs. Currently supports: Pods, Services, Namespaces, Network Policies.

  • Watching CRUD operations for those constructs & performing actions on those operations. Currently: Only listing the object details (ObjectMeta and object pecific Specs)

Based on various bits and pieces, and code samples found on the net. Thanks to all involved but particularly to our dear friends at Aporeto and their Trireme OSS project.

Usage

Requires a kubeconfig file -- e.g. kubelet.kubeconfig for authentication to the Kubernetes cluster

Build accordingl (go build) then start as:

/k8s-client  -alsologtostderr -kubeconfig /path/to/kubelet.kubeconfig 

Comments, Questions, Issues, Contributions

Via Github. TIA for any