This will work if you use kubernetes token auth. This doc doesn't work if you use kubectl auth plugins. Each auth plugin will need a different approach.
Here are instructions for AWS:
Change your dockerfile to this:
FROM golang:1.20-alpine as auth-builder
RUN go install sigs.k8s.io/aws-iam-authenticator/cmd/aws-iam-authenticator@v0.5.9
# Dockerfile with telepresence and its prerequisites
FROM alpine:3.13
# Install Telepresence prerequisites
RUN apk add --no-cache curl iproute2 sshfs
# Download and install the telepresence binary
RUN curl -fL https://app.getambassador.io/download/tel2/linux/amd64/latest/telepresence -o telepresence && \
install -o root -g root -m 0755 telepresence /usr/local/bin/telepresence
COPY --from=auth-builder /go/bin/aws-iam-authenticator ./aws-iam-authenticator
RUN install -o root -g root -m 0755 aws-iam-authenticator /usr/local/bin/aws-iam-authenticator && \
rm aws-iam-authenticator
There's currently a doc on running telepresence in a container:
https://github.com/telepresenceio/telepresence.io/blob/529193ba20a82485054739e4260283ee44866e1d/docs/pre-release/reference/inside-container.md
This will work if you use kubernetes token auth. This doc doesn't work if you use kubectl auth plugins. Each auth plugin will need a different approach.
Here are instructions for AWS:
Change your dockerfile to this:
Change your
docker run
call to: