Eteration kubectl image with environment substitution and awscli v2 tools
176
kubectl is the Kubernetes command line interface based on bitnami/kubectl with the addition of the following tools:
$ docker run --name kubectl eteration/kubectl:latest
The recommended way to get the kubectl Docker Image is to pull the prebuilt image from the Docker Hub Registry.
$ docker pull eteration/kubectl:latest
To use a specific version, you can pull a versioned tag. You can view the list of available versions in the Docker Hub Registry.
$ docker pull eteration/kubectl:[TAG]
If you wish, you can also build the image yourself.
cat << EOF > ./Dockerfile
FROM bitnami/kubectl:1.21-debian-10
USER root
RUN apt-get update \
&& apt-get install gettext libint1 curl unzip -y \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get autoremove -y \
&& apt-get clean
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
RUN unzip awscliv2.zip
RUN ./aws/install
USER 1001
ENTRYPOINT []
CMD [ "kubectl", "--help" ]
EOF
$ docker build -t eteration/kubectl:latest ./Dockerfile
To run commands inside this container you can use docker run, for example to execute kubectl version you can follow the example below:
$ docker run --rm --name kubectl eteration/kubectl:latest version
Consult the Kubectl Reference Documentation to find the completed list of commands available.
It's possible to load your own configuration, which is useful if you want to connect to a remote cluster:
$ docker run --rm --name kubectl -v /path/to/your/kube/config:/.kube/config eteration/kubectl:latest
Copyright 2021 Eteration A.S. Copyright 2021 Bitnami
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Content type
Image
Digest
Size
195.8 MB
Last updated
almost 5 years ago
docker pull eteration/kubectl:1.21-awscliv2