docker build -t miloofcroton/simple-go:1.0.1 .
or
GOOS=linux GOARCH=amd64 go build
docker build -t miloofcroton/simple-go:1.0.2 -f Dockerfile-v2 .
or
docker-compose build
(not necessary with docker-compose)
docker push miloofcroton/simple-go:1.0.2
(replace 9090
with any port number)
docker run \
-it \
-e "PORT=9090" \
-p 9090:9090 \
simple-go:1.0.1
or
docker-compose up
minikube start
note: make sure you have your docker images built and pushed to docker hub
kubectl create -f cluster/app-pod.yml
kubectl create -f cluster/app-pod.yml --namespace simple-go
kubectl create -f cluster/app-namespace.yml
kubectl apply -f cluster
kubectl port-forward simple-go-pod 8080:8080
kubectl get pods
kubectl get pods -w
kubectl get pods,deployments,ns
kubectl get pods --show-labels
kubectl get pods -o wide -L env
kubectl get pods --namespace simple-go
kubectl label pod simple-go-pod hello=world
kubectl label pod simple-go-pod env=prod --overwrite
kubectl delete -f cluster/app-pod.yml
kubectl delete pod simple-go-pod
kubectl delete -f cluster/app-namespace.yml
kubectl delete -f cluster
kubectl scale deployment simple-go --replicas=5
kubectl rollout history deployment simple-go
kubectl set image deployment simple-go simple-go=miloofcroton/simple-go:1.0.4
kubectl rollout undo deployment simple-go