You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: advanced/Controller/README.adoc
+10-1
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,13 @@ Now you have a nice little Controller which watches on `ConfigMap` and restart `
52
52
To try it out, we are reusing the super simple web application which just exposes an environment variable as content.
53
53
This link:../images/mini-http-server.dockerfile[image] uses `nc` to deliver the content and can be found on Docker Hub as https://cloud.docker.com/u/k8spatterns/repository/docker/k8spatterns/mini-http-server[k8spatterns/mini-http-server].
54
54
55
-
Before we deploy this app, we should tail on the log of our controller (e.g. `kubectl logs -f config-watcher-controller-....`) to see the events received by the controller as they come in.
55
+
Before we deploy this app, we should tail on the log of our controller (e.g. `kubectl logs -f config-watcher-controller-....`) to see the events received by the controller as they come in, e.g. with
56
+
57
+
[source,bash]
58
+
----
59
+
controller_pod=$(kubectl get pod -o name | grep config-watcher-controller | sed -e "s/^pods\///")
60
+
kubectl logs -f $controller_pod config-watcher
61
+
----
56
62
57
63
Then create the web application itself:
58
64
@@ -65,6 +71,9 @@ kubectl create -f web-app.yml
65
71
If you look into this descriptor, you will find a `Deployment` using our dumb HTTP server which references the content environment variable via a `ConfigMap`.
66
72
The `ConfigMap` itself is annotated with a pod selector `k8spatterns.io/podDeleteSelector: "app=webapp"` which directly select the webapp `Pod`.
67
73
74
+
This resource file also includes the definition of a Service and an Ingress object so that we can access the server from the outside.
0 commit comments