https://github.com/evertras/kustomize-demo
Quick demo playing with Kustomize
https://github.com/evertras/kustomize-demo
Last synced: 5 months ago
JSON representation
Quick demo playing with Kustomize
- Host: GitHub
- URL: https://github.com/evertras/kustomize-demo
- Owner: Evertras
- License: mit
- Created: 2022-03-05T08:48:34.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-05T10:08:07.000Z (over 4 years ago)
- Last Synced: 2025-04-06T00:25:46.166Z (about 1 year ago)
- Language: Makefile
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kustomize-demo
Quick demo playing with Kustomize.
Referenced heavily from https://github.com/kubernetes-sigs/kustomize/blob/master/examples/helloWorld/kustomization.yaml
## The demo app
We use [hello](https://github.com/monopole/hello) as a demo application here.
It allows us to change some arbitrary configuration for demonstration purposes.
## Checking Kustomize output
```bash
# Check each of the environments by viewing the output, does NOT apply!
make dev
make stg
make prod
# These are just doing something like the following for convenience
./bin/kustomize build deploy/development
# Check the difference between any environment
./diff.sh base development
./diff.sh development production
```
## Applying
We can use the built in `kubectl -k` flag to send Kustomize definitions.
```bash
kubectl apply -k deploy/development
kubectl apply -k deploy/staging
kubectl apply -k deploy/production
```
Now we can check the output by going to:
* Dev: http://localhost:8666
* Stg: http://localhost:8667
* Prod: http://localhost:8668
Note the different version numbers, different greetings, and that dev/stg are
using an italic font (the 'risky feature') while production does not.
## Deleting
To delete, just do the same as `apply` but with `delete`:
```bash
kubectl delete -k deploy/development
kubectl delete -k deploy/staging
kubectl delete -k deploy/production
```