Skip to content

Commit 3f6ab3d

Browse files
committed
Worked on
1 parent 09f8381 commit 3f6ab3d

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

advanced/Controller/README.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
== Controller
22

3-
This example demonstrates a simple *Controller* which evaluates `ConfigMaps` and restart associated pods if such a `ConfigMap` changes.
3+
This example demonstrates a simple controller which evaluates `ConfigMaps` and restart associated pods if such a `ConfigMap` changes.
44

55
This controller is been inspired from https://github.com/fabric8io/configmapcontroller[configmap-controller] but for more limited.
66

@@ -21,11 +21,12 @@ minikube start
2121
minikube addons enable ingress
2222
----
2323

24+
More options for running the example are described in link:../../INSTALL.adoc#minikube[installation instructions].
25+
2426
The controller script itself is stored in a `ConfigMap` and can be easily edited later on:
2527

2628
[source,bash]
2729
----
28-
# Create a configmap holding the controller shell script:
2930
kubectl create configmap config-watcher-controller --from-file=./config-watcher-controller.sh
3031
----
3132

advanced/images/README.adoc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,26 @@ They are also available directly via Docker Hub.
77
* link:kubeapi-proxy.dockerfile[k8spatterns/kubeapi-proxy] is an alpine Linux with a local `kubectl` installed and `kubectl proxy` started with the proper CA and token mounted. The original version https://github.com/luksa/kubernetes-in-action/tree/master/Chapter08/kubectl-proxy[kubectl-proxy] is from https://github.com/luksa[Marko Lukša] who introduced this proxy in his fine book https://www.manning.com/books/kubernetes-in-action[Kubernetes in Action].
88
* link:curl-jq.dockerfile[k8spatterns/curl-jq] which is an https://hub.docker.com/_/alpine/[alpine] Image with https://curl.haxx.se/[curl] and https://stedolan.github.io/jq/[jq] added.
99
* link:mini-http-server.dockerfile[k8spatterns/mini-http-server] is a super simple HTTP server based on `nc` which just answers each HTTP request with the same message provided by an environment variable `MESSAGE`. This is for demo purposes only, of course.
10+
11+
12+
The best way to build these image is with `docker buildx` so that you can crossbuild it for multiple platforms:
13+
14+
[source, bash]
15+
----
16+
docker buildx create --use
17+
----
18+
19+
[source, bash]
20+
----
21+
docker buildx build --platform linux/arm64/v8,linux/amd64 -f kubeapi-proxy.dockerfile --push -t k8spatterns/kubeapi-proxy .
22+
----
23+
24+
[source, bash]
25+
----
26+
docker buildx build --platform linux/arm64/v8,linux/amd64 -f curl-jq.dockerfile --push -t k8spatterns/curl-jq .
27+
----
28+
29+
[source, bash]
30+
----
31+
docker buildx build --platform linux/arm64/v8,linux/amd64 -f mini-http-server.dockerfile --push -t k8spatterns/mini-http-server .
32+
----

advanced/images/kubeapi-proxy.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Image: k8spatterns/kubeapi-proxy
22
FROM alpine
3-
ENV KUBECTL_VERSION=v1.25.2
3+
ENV KUBECTL_VERSION=v1.26.3
44
RUN apk update \
55
&& apk add curl \
66
&& curl -L -O https://dl.k8s.io/${KUBECTL_VERSION}/kubernetes-client-linux-amd64.tar.gz \

0 commit comments

Comments
 (0)