https://github.com/devops-works/docker-kubegcp
https://github.com/devops-works/docker-kubegcp
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/devops-works/docker-kubegcp
- Owner: devops-works
- Created: 2024-11-21T16:04:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-11-07T13:11:56.000Z (5 months ago)
- Last Synced: 2025-11-07T15:16:32.988Z (5 months ago)
- Language: Dockerfile
- Size: 8.79 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# kubegcp
`kubegcp` is a simple Docker image bundling `kubectl` and `gcloud` together in order to query a GKE cluster within Docker.
## Usage
Best way to use it is to mount your Kubernetes and Gcloud client configuration, read-only, on the container to authenticate with the same profiles than locally.
### Examples
Expose a Kubernetes service locally from Docker, using local credentials
```
docker run -it --rm --name remote-elastic \
-v ~/.kube:/.kube/:ro \
-v ~/.config/gcloud:/.config/gcloud/:ro \
devopsworks/kubegcp \
port-forward -n MY-NAMESPACE svc/elasticsearch 9200:9200 --context MY-KUBE-CONTEXT --address='0.0.0.0'
```
## TODO
- [ ] Try to reduce image size by removing unnecessary libraries