package
0.33.0-alpha.2
Repository: https://github.com/kubernetes/client-go.git
Documentation: pkg.go.dev

# README

Workqueue Example

This example demonstrates how to write a controller which follows the states of watched resources.

It demonstrates how to:

  • combine the workqueue with a cache to a full controller
  • synchronize the controller on startup

The example is based on https://git.k8s.io/community/contributors/devel/sig-api-machinery/controllers.md.

Running

# if outside of the cluster
go run *.go -kubeconfig=/my/config

# Functions

NewController creates a new Controller.

# Structs

Controller demonstrates how to implement a controller with client-go.