User Tools

Site Tools


network_stuff:kubernetes

This is an old revision of the document!


In Kubernetes deployment~=application. Is ‘what we build’.

Hierarchy: Cluster > Node > Pod
Cuerpo nacional de policía
+ private worker nodes

  • Container engine (podman(rhel, lxc or docker) runs the containers
  • k8s orchestrates them

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.
K8s provides container tooling whereas service mesh provides microservices tooling.

  • This is the GLOSSARYfor kubernetes terms:
  • Node: just servers, connected to each other normally with (sdn) network
    • the devops guy deploys a network overlay on the above ^ normally with a single 'kubectl' command (eg: vxlan overlay)
    • k8s install a 'kubelet' in each node to orchestrate it into clusters
    • kproxy: using iptables
  • Cluster
  • Pod: Ephemeral application/services. It appears after the 'deployment'. We can have the same Pod running in multiple containers.
    • what stays static among the ephemeral pod states:
      • service node port (nat)
      • service cluster ip (internal, from pod to pod)
      • service load balancer (external IP address, cluster exposed)
    • deployment > replicaSet > pod
  • Cluster consists of one master machine and multiple worker machines or nodes. The master coordinates between all the nodes

KUBERNETES NETWORKING:
kubernetes_networking_deep_dive.pdf

  • Networking via:
    • (CNI) like Nuage or Flannel, weave weave or the more recent standard isco
    • low level abstraction (aci)




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
network_stuff/kubernetes.1621613616.txt.gz · Last modified: (external edit)