chronos

command module
v0.0.0-...-393c0c4 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

README

Chronos

A custom Kubernetes Controller to watch Pods in all namespaces

Introduction

Chronos is a kubernetes controller that I wrote to understand the internal workings of controllers. I followed a pattern that was widely used by many production ready custom controllers like Kubewatch and Nginx ingress. Important topics that you would understand are:

  1. Informers
  2. Work Queues

The command line is written using Cobra CLI Framework.

Installation

You need to have 'go' installed and setup on the system.
After cloning the repository,you can run this program by executing:

#/>go run main.go -k {path to the kubeconfig}
                    or  
You can also choose to build the program and run it.  
                    or  
Build a docker image and deploy it as a pod in a Kubernetes cluster \\
and it will use the Incluster Config file to communicate with API server.\\
Create a role and rolebinding to provide access to Kubernetes Object store.

Check the help menu by passing -h or --help:

#/>go run main.go -h  
Kubernetes event collector and notifier  

Usage:  
  chronos [flags]  
  chronos [command]  

Available Commands:  
  help        Help about any command  
  version     chronos version  

Flags:  
  -h, --help                help for chronos  
  -k, --kubeconfig string   path to kubeconfig file  

Use "chronos [command] --help" for more information about a command.  
What does it do

The current version of Chronos tracks the status of Pods in all namespaces and logs on the command line whenever it detects a state change for a Pod.

References

Find the below links that I refered to write the controller:

  1. https://engineering.bitnami.com/articles/kubewatch-an-example-of-kubernetes-custom-controller.html
  2. https://github.com/bitnami-labs/kubewatch/blob/master/pkg/controller/controller.go

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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