FROM debian:buster-slim

RUN apt-get update && apt-get install --yes --no-install-recommends \
    ca-certificates \
    curl

ARG KUBERNETES_VERSION=v1.17.0
RUN curl --location https://dl.k8s.io/$KUBERNETES_VERSION/kubernetes-node-linux-amd64.tar.gz \
    | tar -xvz --directory=/usr/local/bin --strip-components=3 kubernetes/node/bin/kubelet

#RUN apt-get install --yes --no-install-recommends strace
#ENTRYPOINT ["strace", "-f"]

# --healthz-port
HEALTHCHECK CMD [ "$(curl --silent --show-error http://localhost:10248/healthz)" = "ok" ] || exit 1