Sign inSign up

pcloud/eks-helm-kubectl

By pcloud

Updated almost 3 years ago

Docker image for CICD pipeline to deploy/provision to AWS EKS cluster

Image
Developer tools
1

3.7K

pcloud/eks-helm-kubectl repository overview

docker-eks-helm-kubectl

ci Docker Stars Docker Pulls

This Docker image provide kubectl and helm for working with K8S cluster and specially AWS EKS cluster.

Usages:

  • CICD pipeline (Gitlab, Github, Jenkins...) to deploy helm chart or run kubectl commands.
  • Local development: Mount kubeconfig into container to work with K8S cluster.

Supported versions

k8shelmaws-iam-authenticatoraws-cli
1.273.13.20.6.112.13.5
1.263.13.20.6.112.13.5
1.253.10.30.6.22.11.25
1.243.9.40.5.91.22.81
1.233.8.20.5.91.22.81
1.223.8.20.5.91.22.81
1.213.8.20.5.91.22.81

Run

Local

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/eks-helm-kubectl:1.26-mainstream

Get contexts inside container:: /config # kubectl config get-contexts

Use with Gitlab CICD

.gitlab-ci.yaml

stages:
  - verify

verify-my-cluster:
  stage: verify
  image: pcloud/eks-helm-kubectl:1.26-mainstream
  before_script:
    - export AWS_ACCESS_KEY_ID=your-key-id
    - export AWS_SECRET_ACCESS_KEY=your-access-key
    - aws eks update-kubeconfig --region ap-southeast-1 --name my-cluster
    - kubectl config get-contexts
  script:
    - kubectl version --client
    - helm ls -A
  when: manual

Build

Build local image: make docker-build

...
=> => writing image sha256:ef69f9233f9cbb49099d80d01fcf46f129189427e78bf705b969387af47c17a5                        0.0s
=> => naming to docker.io/pcloud/eks-helm-kubectl:dev

Tag summary

Content type

Image

Digest

sha256:45dc7b158

Size

98.4 MB

Last updated

almost 3 years ago

docker pull pcloud/eks-helm-kubectl