Test your Kubernetes tools & helm charts against a full apiserver - all in one container.
9.4K
This is service container for services that use the Kubernetes-API.
When developing against the Kubernetes-API or validating manifests/helm-charts the Kubernetes API oten gets mocked or linters are used. These often do not cover all test-cases. This is a container that just spans a minimal, real Kubernetes-API server with etcd and accepts API-Calls with full validation.
No need to mock, no need for a fat minikube/kind/k3s install just one container.
Just run:
docker run --rm -it -p 6443:6443 hegerdes/kubernetes-etcd
# Default token - can be overwritten
export TOKEN=31ada4fd-adec-460c-809a-9e56ceb75269
# Now you can use the API with curl
curl -kH "Authorization: Bearer $TOKEN" https://localhost:6443
# Or with kubectl
kubectl --token $TOKEN --server https://localhost:6443 --insecure-skip-tls-verify=true get pods
Or use it in the CI
# .gitlab-ci.yaml
HELM:install:test:
image: alpine/helm
services:
- name: hegerdes/kubernetes-etcd
alias: kubernetes
script:
- helm upgrade --install --kube-apiserver https://kubernetes:6443 --kube-token $KUBE_TOKEN --kube-insecure-skip-tls-verify my-release my-repo/my-chart
By default the container generates new certificates for communication on every new start - in no custom certs are provided. Additionally you can:
USER_TOKENS env. See here for formatETCD_DATA envCERTS_DIRFor more options see GitHub
A new version of this container image gets published every month on the first. Supported are the there latest minor kubernetes versions with the newest patch level. Container image source can be found on GitHub
This is a vanilla Kubernetes-API Server. While it can accept all kind of requests, including CRDs, it can not actually start pods. When you need this you should use minikube or kind.
Content type
Image
Digest
sha256:c72066951…
Size
66.6 MB
Last updated
21 days ago
docker pull hegerdes/kubernetes-etcd