[1] Add this Dockerfile
FROM python:alpine
ARG CLI_VERSION=1.18.188
RUN apk -uv add --no-cache groff jq less mysql-client && \
pip install --no-cache-dir awscli==$CLI_VERSION
CMD sh
Above installs following tools:
- Python
- jq
- MYSQL client
- AWS CLI
[2] Build the image
docker build -t platform/mysql .
[3] Push the image to an artifactory of your choice
[4] Run the pod with the image
kubectl run mysql --rm -i --namespace=platform --image <artifactory_url>/mysql:latest --serviceaccount mysql