Purpose: use inotifywait to watch for ConfigMap changes and to send signal to Nginx if necessary.
To simply the demo steps, use Skaffold to bootstrap the whole stuff.
.
├── Dockerfile
├── nginx-config.yml
├── nginx-service.yml
├── skaffold.yaml
└── watch-nginx.sh
0 directories, 5 files
-
Create a
inotify-example
namespace for this test:% kubectl create ns inotify-example
-
Use Skaffold to load configmap content (
nginx-config
) and bring up nginx app (service/nginx
) in theinotify-example
namespace:% skaffold dev -n inotify-example
-
Edit the ConfigMap content, eithor by:
% kubectl edit configmap nginx-config -n inotify-example
or by:
% vi nginx-config.yml
You can see the demo at: