Up to now, we exposed ports on single master nodes, which is quite inconvenient on user side and troublesome on development side. Now, we're creating a proxy container which exposes a single port and proxies traffic to all master nodes. Currently, this only works with 'k3d create cluster' and won't update the proxy when using 'k3d create node --role master'.
13 lines
403 B
Docker
13 lines
403 B
Docker
FROM nginx:1.16.0-alpine
|
|
|
|
RUN apk -U --no-cache add curl ca-certificates\
|
|
&& mkdir -p /etc/confd \
|
|
&& curl -sLf https://github.com/kelseyhightower/confd/releases/download/v0.16.0/confd-0.16.0-linux-amd64 > /usr/bin/confd \
|
|
&& chmod +x /usr/bin/confd \
|
|
&& apk del curl
|
|
|
|
COPY templates /etc/confd/templates/
|
|
COPY conf.d /etc/confd/conf.d/
|
|
COPY nginx-proxy /usr/bin/
|
|
|
|
ENTRYPOINT nginx-proxy |