custom-k8-controller

command module
v0.0.0-...-5e9423d Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

README

Writing Custom Kubernetes Controller and Webhooks

More details about this repository can be found in Medium blog

Create kind cluster and install certificate manager for testing

$ kind create cluster --name custom-controller
$ kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.7.1/cert-manager.yaml

Create and install the manifests

$ make manifests
$ make install

Build the controller

$ make docker-build IMG=karthik/custom-controller:v1

Load the image on to kind cluster

$ kind load docker-image karthik/custom-controller:v1 --name custom-controller

Run the controller

$ make deploy IMG=karthik/custom-controller:v1

Verify the pod state

$ kubectl -n custom-k8-controller-system  get pods

Get the logs of the pod

$ kubectl -n custom-k8-controller-system logs -f <pod_name>

Create a sample sum resource

$ kubectl create -f config/samples/calculator_v1_sum.yaml

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1
Package v1 contains API Schema definitions for the calculator v1 API group +kubebuilder:object:generate=true +groupName=calculator.sample.domain
Package v1 contains API Schema definitions for the calculator v1 API group +kubebuilder:object:generate=true +groupName=calculator.sample.domain

Jump to

Keyboard shortcuts

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