minikube(https://kubernetes.io/docs/tasks/tools/install-minikube/)
go build -o ./bin/cloud-native-go
/bin -> compiled binary file
docker build -f builder.dockerfile -t cloud-native-go:1.0.2-alpine .
docker build -f app.dockerfile -t cloud-native-go:1.0.1-alpine .
- minikube dashboard (to startup dashboard)
- minikube start
- minikube stop
- minikube service cloud-native-go --url
kubectl create -f k8s-pod.yml
kubectl create -f k8s-pod.yml --namespace cloud-native-go
kubectl delete pod cloud-native-go
kubectl get pods kubectl get pods --show-labels kubectl get pods -o wide -L env
kubectl describe pod cloud-native-go
kubectl label pod cloud-native-go env=dev --overwrite
kubectl get ns kubectl get pods --namespace cloud-native-go
kubectl create -f k8s-namespace.yml
kubectl delete -f k8s-namespace.yml
kubectl get deployments,pods,rs
kubectl create -f k8s-deployment.yml --record=true
kubectl apply -f k8s-deployment.yml
kubectl describe deployment cloud-native-go
kubectl scale deployment cloud-native-go --replicas=5 kubectl rollout history deployment cloud-native-go
Service is a "gate" for a pods kubectl create -f k8s-service.yml kubectl get services
kubectl set image deployment cloud-native-go cloud-native-go=cloud-native-go:1.0.1-apline
kubectl rollout undo deployment cloud-native-go
kubectl port-forward cloud-native-go 8080:8080