https://github.com/0xdevalias/poc-kubernetes-batch
PoC to create a new k8s Job using the Golang API, making use of Init Containers.
https://github.com/0xdevalias/poc-kubernetes-batch
golang init-containers k8s kubernetes kubernetes-api poc proof-of-concept
Last synced: 7 months ago
JSON representation
PoC to create a new k8s Job using the Golang API, making use of Init Containers.
- Host: GitHub
- URL: https://github.com/0xdevalias/poc-kubernetes-batch
- Owner: 0xdevalias
- License: mit
- Archived: true
- Created: 2018-01-05T12:34:00.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-07T10:59:55.000Z (about 8 years ago)
- Last Synced: 2025-07-04T03:52:03.791Z (8 months ago)
- Topics: golang, init-containers, k8s, kubernetes, kubernetes-api, poc, proof-of-concept
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# poc-kubernetes-batch
PoC to create a new k8s Job using the Golang API, making use of Init Containers.
## Setup
```
# Kubernetes
brew cask install minikube
brew install docker-machine-driver-xhyve
brew install kubectl
minikube start --vm-driver=xhyve
eval $(minikube docker-env)
kubectl create -f ./namespace.yaml
# Dependency Management
brew install glide
glide up -v // AKA: glide update --strip-vendor
```
## Usage
```
eval $(minikube docker-env)
go run main.go
```
## Improvements
* Switch from Glide to Dep [when Kubernetes client-go supports it](https://github.com/kubernetes/client-go/blob/master/INSTALL.md#dep-not-supported-yet)
## References, etc
* https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
* https://v1-8.docs.kubernetes.io/docs/api-reference/v1.8/
* https://github.com/kubernetes/client-go/tree/master/examples
* https://stackoverflow.com/questions/32554893/how-can-i-create-a-simple-client-app-with-the-kubernetes-go-library