Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add container support for aws-cli and AWS EKS clusters #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ LABEL maintainer="[email protected]"

# hadolint ignore=DL3018
RUN apk add --update --no-cache \
bash bind-tools jq yq openssh-client git tar xz gzip bzip2 curl coreutils grep && \
bash bind-tools jq yq openssh-client git tar xz gzip bzip2 curl coreutils grep python3 py3-pip && \
curl -sLo /usr/bin/kubectl \
"https://storage.googleapis.com/kubernetes-release/release/v$KUBECTL_VERSION/bin/linux/amd64/kubectl" && \
chmod +x /usr/bin/kubectl

RUN pip3 install awscli

COPY ./kube-dump /kube-dump

ENTRYPOINT [ "/kube-dump" ]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Optional dependencies:
* `xz` - a lossless data compression file format based on the LZMA algorithm
* `gzip` - single-file/stream lossless data compression utility
* `bzip2` - compression program that uses the Burrows–Wheeler algorithm
* `aws-cli` - support for access to Amazon EKS clusters

## Commands and flags

Expand Down
8 changes: 8 additions & 0 deletions docs/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ docker run --tty --interactive --rm \

Kube-dump is set as entrypoint, you only need to pass command and flags to container.

When connecting to AWS EKS, add your credentials as a volume mount for aws-cli to authenticate:
```shell
docker run --tty --interactive --rm \
--volume $HOME/.kube:/.kube --volume $HOME/.aws:/root/.aws --volume $HOME/dump:/dump \
woozymasta/kube-dump:latest \
dump-namespaces -n dev,prod -d /dump --kube-config /.kube/config
```

For more convenience, you can create an alias for calling kube-dump from a container:

```shell
Expand Down