Presentation is in english, besides first slide. In presentation I represented basics concepts from docker and kubernetes, each part ends with short example. On my github: https://github.com/arekborek/k8s-jdd you can find additional information.
5. Old way: shared machines
● No isolation
● No namespacing
● Common libs
● High coupled apps and OS
source@kubernetes.io
6. Old way: shared app servers
● No isolation
● No namespacing
● Common libs
source@kubernetes.io
7. Old way: many virtual machines
● Some isolation
● Expensive and inefficient
● Still highly coupled
to the guest OS
● Hard to manage
source@kubernetes.io
10. Containers: Security
● Chroots determines what parts of the
filesystem a use can see
● Control - CPU, Memory, IO via cgroups
● Limits what a user can do: mount, kill,
chown
● No access to host !!!
11. Containers: Other features
● New approach to packaging
● Lightweight
● Runs on any machine
Physical, virtual, cloud
● Write once – run everywhere!
Development, Test, Staging, Production
22. What next ??
● What if there are more containers?
● Scheduling – where should my containers run ?
● Lifecycle and health: keep my containers
running
● Discovery: where are my container now ?
● Monitoring: What’s happening with my
container ?
● Scaling: Making job bigger or smaller
26. Enter Kubernetes (k8s)
● Greek for “Helmsman”, also the root of the word
“Governor”
● Container orchestrator, run containers
● Support multiple cloud and bare-metal
environments
● Inspired and informed by Google’s experiences
and internal systems
● Open source, written in Go
28. Enter Kubernetes (k8s)
● Kubernetes master – order others
● Kublet – ask how many resources you have if
enough run machine
● Distributed process scheduler
● Cluster of machines as one
● All your machines via kubernetes can be treats
as one single machine
32. Pod networking
● Pod IPs routable, docker default is private IP
● Pods can reach each other without NAT, even
across nodes
● No brokering of port numbers
● This is fundamental requirement, several SDN
solutions
44. apiVersion: v1
kind: Service
metadata:
labels:
env: jdd
visualize: "true"
name: hello-jdd
spec:
ports:
- port: 8080 #The port that this service should serve on.
selector: #Label keys and values connect RC and Service
env: jdd
tier: backend
type: LoadBalancer
45. Test :)
for ((;;)) do
curl http://localhost:8080;
printf 'n';
sleep 1;
done
49. Some useful cmds
kubectl get rc
kubectl get pods
kubectl logs <POD_NAME>
kubectl cluster-info
kubectl config view
kubectl describe rc <RC_NAME>
kubectl get -o json pod
50. Some useful ...
Staging vs. production
Use label – deploy in the same infrastructure
Service discovery
Kubernetes API Or… DNS Lookups!
Use Docker Machine
In the cloud – faster network to download
images
51. Some useful ...
Don’t Log to Container Filesystem!
Log to a volume… docker -v /tmp/log:/log Or
Send it elsewhere!
Clean up disk spaces
Every image, layer and even container litters
Use Spring Profile
One container – run on Docker Machine,
Kubernetes, and App Engine!