1. Tvorba siete v Kubernetes
pre začiatočníkov
alebo pre tých, čo nevedia čo je iptables
Marián Kuna
mkunask@gmail.com
4. Kubernetes Meetup
October 16th 2019
2.
3. Kto je Gedeon Majunke?
a) Postava z epizódy IX Hviezdnych Vojen - The Rise of Skywalker
b)Ministerský predseda Ugandy
c) Slovenský architekt, staviteľ Teryho Chaty
4.
5.
6. Pod
• A Pod is the basic execution unit of a Kubernetes application
• A Pod encapsulates an application’s container (or, in some cases,
multiple containers), storage resources, a unique network IP, and
options that govern how the container(s) should run.
• Docker is the most common container runtime used in a Kubernetes
Pod
7. Cluster Networking
There are 4 distinct networking problems to solve:
• Highly-coupled container-to-container communications
• Pod-to-Pod communications
• Kubernetes assumes that pods can communicate with other pods,
regardless of which host they land on
• Service-to-Pod communications
• External-to-Service communications
10. Pod
• A Pod is the basic execution unit of a Kubernetes application
• A Pod encapsulates an application’s container (or, in some cases,
multiple containers), storage resources, a unique network IP, and
options that govern how the container(s) should run.
15. Cluster Networking
There are 4 distinct networking problems to solve:
• Highly-coupled container-to-container communications
• Pod-to-Pod communications
• Kubernetes assumes that pods can communicate with other pods,
regardless of which host they land on
• Service-to-Pod communications
• External-to-Service communications
22. Cluster Networking
There are 4 distinct networking problems to solve:
• Highly-coupled container-to-container communications
• Pod-to-Pod communications
• Kubernetes assumes that pods can communicate with other pods,
regardless of which host they land on
• Service-to-Pod communications
• External-to-Service communications
25. Pods
λ kubectl apply -f deployment.yml
deployments "microcities" created
λ kubectl get pods -o wide
NAME READY STATUS RESTARTS AGE IP
microcities-65944d6586-8chwt 1/1 Running 0 38m 10.244.0.18
microcities-65944d6586-hwgvz 1/1 Running 0 38m 10.244.2.11
λ kubectl apply -f service.yml
service "microcities-svc" created
λ kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
microcities-svc ClusterIP 10.96.226.20 <none> 80/TCP 4m45s
28. What is a netfilter and iptables[tl;dr]
• netfilter is a rules-based packet processing engine. It runs in kernel
space and gets a look at every packet at various points in its life cycle.
• It matches packets against rules and when it finds a rule that matches
it takes the specified action.
• Among the many actions it can take is redirecting the packet to
another destination.
• iptables is a user space interface to netfilter
30. Cluster Networking
There are 4 distinct networking problems to solve:
• Highly-coupled container-to-container communications
• Pod-to-Pod communications
• Kubernetes assumes that pods can communicate with other pods,
regardless of which host they land on
• Service-to-Pod communications
• External-to-Service communications