03 - KUBERNETES Flashcards
What is kubernetes ?
kubernetes is s tool for running a bunch of different containers
how des kubernetes manage the containers
it gets s configuration to describe how we want our containers to run and interect with each other
enable kubernetes from UI for mac
how to install k8s in linux
minikube
what is a k8s cluster
a collection of nodes + a master to manage them
Node on k8s
a virtual machine that will run our containers
Pod in k8s
more or less a running container
Deployment
monitors a set of pods, make sure they are running and restarts them if they crash
service
provides an easy-to-remember URL to access a running container
function of the k8s config file
tells k8s about the different deployments, pods, and services, referred to as objects
sample k8s config file to create a Pod
build docker image
filename: posts.yaml
apiVersion: v1
kind: Pod
metadata:
name: posts
spec:
containers:
- name: posts
image: tagName/posts:0.0.1
command to execute k8s config
kubectl apply -f posts.yaml
display all pods
kubectl get pods
how k8s handle latest tag on image name
run command in pod
kubectl exec -it [pod-name] [cmd]