Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/makkes/validating-webhook-example
A minimal Kubernetes Validating Admission Webhook
https://github.com/makkes/validating-webhook-example
Last synced: 3 days ago
JSON representation
A minimal Kubernetes Validating Admission Webhook
- Host: GitHub
- URL: https://github.com/makkes/validating-webhook-example
- Owner: makkes
- Created: 2019-12-02T11:38:27.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-03T11:42:04.000Z (about 5 years ago)
- Last Synced: 2024-11-01T22:42:45.300Z (about 2 months ago)
- Language: Go
- Size: 51.8 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A minimal Kubernetes Validating Admission Webhook
This is an example repo to get started with [validating admission webhooks](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/)
on Kubernetes. It features a webhook written in Go as well as all resources needed to deploy it into a Kubernetes
cluster as a service.## Getting Started
The easiest way to get started is to build the service, push the Docker image to Docker Hub and create the resources:
If you don't have `cert-manager` installed in your cluster, do that now:
```sh
$ make deploy-cert-manager
```Then build, push and roll out the webhook (make sure to set your Docker Hub username accordingly):
```sh
$ make deploy DOCKER_IMG=YOUR_DOCKER_HUB_USER/minimal-webhook:dev
```Try to spin up a pod in another terminal window:
```sh
k run debug --image=debian:latest --rm -it --restart=Never -- sh
```Then you should be able to see all admission requests in the webhook's pod's logs:
```sh
$ kubectl logs -f deploy/minimal-webhook
```