https://github.com/antoniakras/k8s-crd-controller-webhook
Extended Kubernetes with Custom Resource Definitions (CRDs), custom controllers, and admission webhooks for validation and automation.
https://github.com/antoniakras/k8s-crd-controller-webhook
automation cloud-native crd devops kubernetes webhook
Last synced: about 2 months ago
JSON representation
Extended Kubernetes with Custom Resource Definitions (CRDs), custom controllers, and admission webhooks for validation and automation.
- Host: GitHub
- URL: https://github.com/antoniakras/k8s-crd-controller-webhook
- Owner: antoniakras
- Created: 2025-08-23T16:27:47.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-25T13:01:35.000Z (10 months ago)
- Last Synced: 2026-05-03T15:39:42.329Z (about 2 months ago)
- Topics: automation, cloud-native, crd, devops, kubernetes, webhook
- Language: Python
- Homepage:
- Size: 4.47 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Project Overview
---------------------
## Project Overview
This project extends Kubernetes functionality by implementing:
- **Custom Resource Definitions (CRDs)** to introduce new Kubernetes resource types.
- **Custom Controllers** to manage lifecycle events of these resources.
- **Admission Webhooks** for validating and mutating requests before they reach the cluster.
## csd4140 | Antonia Krasoudaki
### Task 1
* a )
kubectl apply -f fruit-crd.yaml
* b )
kubectl apply -f basket.yaml
* c )
kubectl get fruit apple -o yaml
* d )
kubectl get fruits

### Task 2
* a )
docker build -t antoniakras/greeting-controller:latest .
docker push antoniakras/greeting-controller:latest
In the Dockerfile the image python:slim-buster is being pulled. It updates downloads kubectl and installs it,
At the path /app it copies the appropriate files and installs the requirements.
Finally, the controller is running.


* b )
Apply crd and the deployment:
kubectl apply -f greeting-crd.yaml
kubectl apply -f greeting-controler.yaml
In the deployment CLusterRole we use * in rules to make sure that
the right role and access is granted. ClusterRoleBinding references greeting-cluster-role
and binds it with service account.
At the directory crd in the screenshots 1-5 it's visible that when the kubectl describe deployments command is executed, the data and messages are correct in each case.
### Task 3
* a )
* b )