https://pulumi.com logo
#kubernetes
Title
# kubernetes
p

proud-pizza-80589

01/21/2024, 10:17 AM
Has anyone ever done k8s stuff on GKE from inside a docker container? I need to install the google clud sdk and the auth helper to connect to it but it is HUGE...
g

gifted-balloon-26385

01/21/2024, 11:30 PM
@proud-pizza-80589 yes we have - google cloud providers a docker image you can use for CLI stuff that comes with the auth helper preinstalled:
<http://gcr.io/google.com/cloudsdktool/google-cloud-cli|gcr.io/google.com/cloudsdktool/google-cloud-cli>
we used it as a base image for CI and then copied over files we needed for the other CI stuff, e.g:
Copy code
ARG NODE_VERSION=18.10.0
FROM node:${NODE_VERSION} AS node
FROM gcr.io/google.com/cloudsdktool/google-cloud-cli

COPY --from=node /usr/lib /usr/lib
COPY --from=node /usr/local/lib /usr/local/lib
COPY --from=node /usr/local/include /usr/local/include
COPY --from=node /usr/local/bin /usr/local/bin

# Source the shell on every RUN cmd so nvm is in the path
SHELL ["/bin/bash", "--login", "-c"]

RUN apt-get update -y
RUN apt-get autoclean
RUN apt-get autoremove
RUN apt-get install -y sudo
RUN echo Y | gcloud auth configure-docker us-east1-docker.pkg.dev
p

proud-pizza-80589

01/23/2024, 7:03 AM
Yeah, i'm trying to slim down the container itself, but the stupid auth plugin i need requires the cloud sdk which is a few 100mb
b

blue-actor-6315

01/23/2024, 6:48 PM
I also spent too much time trying to get it down
p

proud-pizza-80589

01/25/2024, 6:46 AM