cd posts docker build -t rayalevinson/posts:0.0.1 .
Result: docker.io/rayalevinson/posts:0.0.1
infra --> k8s --> posts-depl.yaml
apiVersion: apps/v1 kind: Deployment metadata: name: posts-depl spec: replicas: 1 selector: matchLabels: app: posts template: metadata: labels: app: posts spec: containers: - name: posts image: docker.io/rayalevinson/posts:0.0.1
cd myProject\infra\k8s
kubectl apply -f posts-depl.yaml
kubectl apply -f [config file name]
kubectl get deployments
kubectl get deployments
kubectl get pods
kubectl describe deployment [depl name]
kubectl describe deployment posts-depl
kubectl delete deployment [depl_name]
kubectl exec -it [pod_name] [cmd]
kubectl exec -it posts sh
<--- run shellOR on Windows
winpty kubectl exec -it posts sh
<--- run shellkubectl logs [pod_name]
kubectl logs posts
kubectl delete pod [pod_name]
kubectl delete pod posts
kubectl apply -f [config file name]
kubectl apply -f posts.yaml
kubectl describe pod [pod_name]
kubectl describe pod posts