Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Zaniewski committed Jan 23, 2020
1 parent c571595 commit 37f7791
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Kubectl with auto-mpletion in a docker container

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.
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.

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

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

## How the image was build:
docker build --rm -f "Dockerfile" -t piotrzan/kubectl-comp "."
Expand All @@ -20,14 +20,15 @@ Use `run.ps1` or `run.sh` for windows or linux respectivels

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

\# **Generate raw config from kubeclt on localhost and copy the config to the container**
kubeclt config view --raw > config
docker cp ./config kubectl-host:./root/.kube
`kubeclt config view --raw > config
docker cp ./config kubectl-host:./root/.kube`

\# **Attach back to the contianer with kubeconfig file containing info about clusters running on localhost**
docker attach kubectl-host

`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.

0 comments on commit 37f7791

Please sign in to comment.