https://github.com/petergrace/service-router-configurator-docker
Docker setup for Mike Newswanger's excellent service-router-configurator
https://github.com/petergrace/service-router-configurator-docker
Last synced: about 1 year ago
JSON representation
Docker setup for Mike Newswanger's excellent service-router-configurator
- Host: GitHub
- URL: https://github.com/petergrace/service-router-configurator-docker
- Owner: PeterGrace
- Created: 2017-12-11T15:51:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-12T15:19:30.000Z (over 8 years ago)
- Last Synced: 2025-02-15T02:44:35.021Z (over 1 year ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
- This is going to require that kubectl and etcdctl can talk to kubernetes and etcd, so you need to start container net=host.
- Before this works, one needs to make a basic service account for kubernetes to auth for kubectl. To do this, you have to create a service account, copy the ca.crt from the service account and also the token (they're base64'd so you have to unencode the base64 when saving them) then pass them into the container via environment variables/volume mounts), then you must give that service account rights to edit the cluster:
- `kubectl create rolebinding svcrouter-binding --clusterrole=view --serviceaccount=default:username`
1. `go get go.mikenewswanger.com/service-router-configurator`
2. `go get github.com/coreos/etcd/etcdctl` (Might need to build static: `CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' .`)
3. `cp $GOHOME/bin/etcdctl $GOHOME/bin/service-router-configurator .`
4. `docker build -t image.name .`
5. `docker push image.name`