This all-in-one Docker image is designed to provide a minimal environment with all the necessary tools for a CI/CD deployment in Kubernetes, no more installing tools on your ci/cd workflows.
Tool | Description | Version |
---|---|---|
kubectl | Kubernetes command-line tool. | 1.29.2 |
kubectlxtra | Wrapper around kubectl with additional functionalities. | 1.0.0 |
kustomize | Customization of Kubernetes YAML configurations. | 5.4.1 |
opkustomize | Wrapper around kustomize with additional functionalities. | 1.3.0 |
helm | Kubernetes package manager. | 3.14.3 |
kubeconform | Tool for validating Kubernetes YAML files against best practices. | 0.6.3 |
1Password cli | 1Password CLI brings 1Password to your terminal. | 2.26.1 |
- Pull the image
docker pull betterdev/k8s-ci-cd:latest
- executing Bash Shell in Container
To open a bash shell within the container:
docker run -it betterdev/k8s-ci-cd bash
- Utilize the included tools (
kubectl
,kustomize
,Helm
,kubeconform
, etc.) to manage your Kubernetes deployments seamlessly.
With this Docker image, you can build your CI/CD pipeline with the following steps:
- Configure your CI/CD to use this image:
#Example on Github actions
name: My Github action workflow
...
jobs:
test:
runs-on: ubuntu-latest
container: betterdev/k8s-ci-cd:latest # <-- Use this docker image
steps:
- run: echo "Running v1.0.0 of this awesome 🐳 Docker image"
- Utilize the included tools (
kubectl
,kustomize
,Helm
,kubeconform
, etc.) to manage your Kubernetes deployments seamlessly.
If you want to build this image from source, ensure you have Docker installed and follow these steps:
- Clone the repository containing the Dockerfile and related scripts.
- Navigate to the directory containing the Dockerfile.
- Build the Docker image using the following command:
docker build -t <image_name> .
This Docker image allows you to select specific versions of the tools included. The versions are defined as build arguments in the Dockerfile. To select a particular version for a tool, follow these steps:
-
Identify the name of the tool and its corresponding build argument in the Dockerfile. Here are the tools and their associated build arguments:
- kubectl:
KUBECTL_VERSION
- kustomize:
KUSTOMIZE_VERSION
- Helm:
HELM_VERSION
- kubeconform:
KUBECONFORM_VERSION
- kubectl:
-
When building the Docker image using the
docker build
command, provide the desired versions as build arguments using the--build-arg
flag. For example:
#Override kubectl and kustomize versions only
docker build -t k8s-ci-cd \
--build-arg KUBECTL_VERSION=1.29.1 \
--build-arg KUSTOMIZE_VERSION=3.5.4 \
. --no-cache
This Docker image is released under the MIT License. Feel free to use and modify them according to your needs.