This project shows comands to create and observe the deployments, pods, jobs, cronjobs and example for out-of-cluster-client-configurations using kubernets/client-go.
kubectl create deployment NAME --image=image [--dry-run] [options]
- example:
kubectl create deployment hello-node --image=k8s.gcr.io/echoserver:1.4
kubectl get deployments
- write job specification file with
.yaml
extension. Demo file is available atexample/job.yaml
kubectl apply (-f FILENAME | -k DIRECTORY) [options]
- example :
kubectl apply -f ./example/job.yaml
kubectl get jobs
kubectl describe jobs/<job-name>
- write cronjob specification in file with
.yaml
extension. Demo file is available atexample/cronjob.yaml
kubectl create -f FILENAME [options]
- example:
kubectl create -f ./example/cronjob.yaml
kubectl get cronjobs
kubectl get jobs --watch
go get k8s.io/client-go@HEAD
- For more details visit "https://github.com/kubernetes/client-go/blob/master/INSTALL.md"
git clone https://github.com/gopay-bootcamp/kubernets-POC.git
cd kubernets-POC
go build -o output .
./output
- Docker
- Kubectl
- Minikube