KUBERNETES IS AN ORCHESTRATOR FOR CONTAINERS:

Hierarchy: Cluster > Node > Pod
+ private worker nodes

K8s is a container orchestrator, designed for creating clusters and hosting pods, its networking model meets exactly those needs. The service mesh (or network layer) ensures that communication between different services that live in containers is reliable and secure.
The state of the is stored in a distributed databased [https://matthewpalmer.net/kubernetes-app-developer/articles/how-does-kubernetes-use-etcd.html#:~:text=Kubernetes%20uses%20etcd%20to%20store,cluster%20read%20and%20write%20data.|etcd ]] (not relational, is distributed key/value store used by the master node or controller to keep the state of the machine it is controlling).


Deployment-object > replicaSet (that crates..) > pods
'service object/abstraction' k8s allows for the pod to keep the same virtual IP in the microservice. :

A simple way of seeing this train is with:

! in minikube
kubectl run mynode  # this creates a deployment object a replica set and pods
kubectl expose

KUBERNETES NETWORKING:
kubernetes_networking_deep_dive.pdf




kubectl get endpoints    # endpoint is an ip:port. Usually, you'd let a service manage endpoints (one EP per pod the service routes traffic to) 
kubectl get svc     # List all services. Services enable a loose coupling between dependent Pods. A Service is defined using YAML
kubectl get pods -n datanado-dev -l app=datanado-qubole-service
kubectl get pods -n audplat-prod    # -n Shorthand for --namespace. For example, if you’d like to list all the Pods in a specific 
kubectl get rs -n audplat-prod    # get the current ReplicaSets deployed    
kubectl get ing

MINIKUBE:

Install minikube:

$ minikube start --memory=4096 --vm-driver=kvm2
$ minikube status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

$ kubectl get all #   $ kubectl get pods -o wide
NAME                 TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
service/kubernetes   ClusterIP   10.96.0.1    <none>        443/TCP   59m
$ kubectl create deployment nginx --image=nginx