Docker image contains tools for cluster provision
1.1K
Docker image provide kubectl and helm and other tools for working with K8S cluster provision.
Quickly run helm/kubectl command
docker run --rm pcloud/cluster-provision helm version
docker run --rm pcloud/cluster-provision kubectl version --client
By default kubectl will try to use /root/.kube/config file for connection to the kubernetes cluster, but does not exist by default in the image.
Mount host ~/.kube/config to container for troubleshooting
docker run --rm -it -v ~/.kube:/root/.kube pcloud/cluster-provision
Get contexts inside container:: /workspace # kubectl config get-contexts
.gitlab-ci.yaml
stages:
- verify
verify-my-cluster:
stage: verify
image: pcloud/cluster-provision:1.22
before_script:
# define KUBE_CONFIG environent varible: type=File
- export KUBECONFIG=$KUBE_CONFIG
- kubectl get ns
script:
- kubectl version --client
- helm ls -A
when: manual
Build local image: make docker-build
...
=> => writing image sha256:ef69f9233f9cbb49099d80d01fcf46f129189427e78bf705b969387af47c17a5 0.0s
=> => naming to docker.io/pcloud/cluster-provision:main
Content type
Image
Digest
sha256:0fe047f06…
Size
211.4 MB
Last updated
almost 4 years ago
docker pull pcloud/cluster-provision