| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| network_stuff:kubernetes [2021/05/04 12:40] – jotasandoku | network_stuff:kubernetes [2023/11/02 14:38] (current) – external edit 127.0.0.1 |
|---|
| In Kubernetes deployment~=application. Is ‘what we build’. | KUBERNETES IS AN ORCHESTRATOR FOR CONTAINERS:\\ |
| |
| | Hierarchy: **Cluster > Node > Pod** \\ |
| | + private worker nodes |
| | |
| | {{:network_stuff:k8s_cartoon.png?=200|}} |
| |
| * Container engine (podman(rhel, lxc or docker) runs the containers | * Container engine (podman(rhel, lxc or docker) runs the containers |
| |
| 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 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. | 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). |
| * [[https://blogs.cisco.com/cloud/service-mesh-for-network-engineers]] | * [[https://blogs.cisco.com/cloud/service-mesh-for-network-engineers]] |
| * This is the [[https://kubernetes.io/docs/reference/glossary/?fundamental=true|GLOSSARY]]for kubernetes terms: | * This is the [[https://kubernetes.io/docs/reference/glossary/?fundamental=true|GLOSSARY]]for kubernetes terms: |
| | * **Cluster**: Consists of one master machine and multiple worker machines or nodes. The master coordinates between all the nodes |
| * **Node**: just servers, connected to each other normally with (sdn) network | * **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) | * 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 | * k8s install a 'kubelet' in each node to orchestrate it into clusters |
| * kproxy: using iptables | * kproxy: using iptables |
| * **Cluster** | * **Pod**: A pod runs a group of container that has common properties and can be orchestrated to scale up/down. (very coarse comparison is that the pod is like a "server" in the sense that groups related processes) |
| * **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: | * what stays static among the ephemeral pod states: |
| * service node port (nat) | * service node port (nat) |
| * service cluster ip (internal, from pod to pod) | * service cluster ip (internal, from pod to pod) |
| * service load balancer (external IP address, cluster exposed) | * 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 | |
| | \\ |
| | |
| | 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 |
| | |
| |
| |
| |
| * Networking via: | * Networking via: |
| * (CNI) like Nuage or Flannel or **weave** [[https://www.weave.works/docs/net/latest/kubernetes/kube-addon/|weave]] | * (CNI) like Nuage or Flannel, **weave** [[https://www.weave.works/docs/net/latest/kubernetes/kube-addon/|weave]] or the more recent standard ''isco'' |
| * low level abstraction (aci) | * low level abstraction (aci) |
| |
| * [[https://istio.io/|Istio]] | * [[https://istio.io/|Istio]] |
| |
| | |
| | {{:network_stuff:k8s-ingress-ctrls.jpeg?400|}} |
| |
| ---- | ---- |
| |
| * k8s in the cloud | * k8s in the cloud |
| * In AWS: EKS[[https://aws.amazon.com/kubernetes/]] | * In AWS: EKS[[https://aws.amazon.com/kubernetes/]] (not to confuse with ESK (Elastic Search) |
| * In OCI: OKE [[https://docs.cloud.oracle.com/en-us/iaas/Content/ContEng/Concepts/contengprerequisites.htm]] | * In OCI: OKE [[https://docs.cloud.mycompany2.com/en-us/iaas/Content/ContEng/Concepts/contengprerequisites.htm]] |
| * Lots of interesting kubernetes information for OCI but also generally applicable [[https://docs.cloud.oracle.com/en-us/iaas/Content/ContEng/Concepts/contengprerequisites.htm#regional-availability|HERE]] | * Lots of interesting kubernetes information for OCI but also generally applicable [[https://docs.cloud.mycompany2.com/en-us/iaas/Content/ContEng/Concepts/contengprerequisites.htm#regional-availability|HERE]] |
| |
| \\ | \\ |