Kubectl installed in an alpine based image from docker. Used for container building and k8s deployments in CI/CD.
deploy:
image: txn2/docker-kubectl:29.1.3-1.35.0-2
script:
- kubectl set image deployment/myapp myapp=myregistry/myapp:${CI_COMMIT_TAG}
--server="${K8S_SERVER}"
--token="${K8S_TOKEN}"
--certificate-authority=ca.crtdocker run --rm txn2/docker-kubectl:29.1.3-1.35.0-2 kubectl version --clientImages are versioned using the format <docker-version>-<kubectl-version>-<revision>. The Makefile automatically uses the latest git tag.
make build # Build with latest git tag
make test # Build and verify kubectl works
make tag # Build and tag as latest
make push # Build, tag, and push both
make all # Same as pushgit tag 29.1.3-1.35.0-3
make push