Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr1215 committed Jan 24, 2020
1 parent 1749054 commit e989900
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
# Kubectl with auto-completion in a docker container

The purpose of this tool is to have a fully portable <code>kubectl</code> command line tool with a few convinience utilities.
Quick testing of a cluster with well-known/customized <code>kubectl</code> setup.
The purpose of this tool is to have a fully portable `kubectl` command line tool with a few convinience utilities.
Quick testing of a cluster with well-known/customized `kubectl` setup.

## What is included
- <code>kubectl</code> v 1.17.2
- <code>kubectl</code> bash completion
- <code>krew</code> plugin

- ``kubectl`` v 1.17.2
- ``kubectl`` bash completion
- ``krew`` plugin
- ``k9s`` cluster monitoring tool
- common .bashrc aliases

## How to use:
After running docker container, all the clusters running on the localhost should be available for <code>kubectl</code> command.
## How to use

After running docker container, all the clusters running on the localhost should be available for `kubectl` command.

## How the image was build

## How the image was build:
docker build --rm -f "Dockerfile" -t piotrzan/kubectl-comp "."

## Convinient scripts to run the contianer:
Use `run.ps1` or `run.sh` for windows or linux respectivels
## Convinient scripts to run the contianer

Use `run.ps1` or `run.sh` for windows or linux respectivels.
Alternatively use docker-compose.yaml, this works by mounting a volume on the $HOME/.kube folder on the host.

### Linux Example

**Run contianer with passthrough to local network**
`docker run -d --network=host --name=kubectl-host --rm -it piotrzan/kubectl-comp`

Expand All @@ -30,5 +37,5 @@ docker cp ./config kubectl-host:./root/.kube`
`docker attach kubectl-host`

## Extending the image
If you would like to add your own customization or <code>krew</code> plugins, you can easily do it and use `docker commit` to create your own version of the image.

If you would like to add your own customization or ``krew`` plugins, you can easily do it and use `docker commit` to create your own version of the image.
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ services:
image: piotrzan/kubectl-comp
container_name: kubectl-host
tty: true
network_mode: "host"
volumes:
- ~/.kube/:/root/.kube/

0 comments on commit e989900

Please sign in to comment.