8. What is Kubernetes
100% Open-source , written by Go
Platform for automating deployment, scaling, and operations
Inspired and informed by Google’s experiences and internal systems
The name meaning “helmsman” or “pilot”
Aka K8s, which is an abbreviation derived by replacing the 8 letters
“ubernete” with 8
8
16. Pod
A Group of co-located containers(one or more)
Shared the same value and network namespace/ip
port
Restart pofile
Healthy
Templates(yaml)
16
20. Pod healthy
Liveness probes
When to restart a Container
ExecAction
Catch a deadlock
Restart state help to record log
InitialDelaySeconds
PeriodSeconds
Readiness Probe
Remove all request
Not sending message to this pod 20
22. label
Arbitrary metadata
The connect with Replication controller and pods
key/value pairs
identify a set of objects via a label selector
22
24. Replication Controller
Ensures that a specified number of pod “replicas” running
at any time
Flexible scale
Auto change the replica
Rolling Update
24
29. The test of replicationcontroller
The yaml file
29
30. We create the replicationController, which pod of label is test:rc
And then we change the pod’s labels from rc to rc2
Because the replicationController get the information that no pod
label is “rc”, so it create the new one
30
31. And we delete the pod
Yes, the pod is different, that because the
ReplicationController keep number is 1 of the pod
which label is “rc”
31
32. And we can also change the number of replica
Ofcourse, you can shrink the number of replica
32
33. Rolling update
Use by deployment and ReplicationController
Update period
Reverse the version(if you need)
33
34. Now we have 4 v1(nginx1.10.5) pod
And we set rolling update our replica
Finally we update all pod to v2(nginx 1.11.5)
34
35. Deployment
K8s of latest version will recommend us
use deployment replace ReplicationController
All features of ReplicationController
Check the status of a Deployment to see if it succeeds or
not
Provides declarative updates for Pods and Replica Sets
Pause and resume
More powerful
35
36. Test: rolling update
set image
kubectl set image deployment <deployment>
<container>=<image>
Replace
change the yaml file and use replace to polling update
kubectl replace -f <yaml>
Edit
kubectl edit deployment <deployment>
36
39. Service
Defines a logical set of Pods and a policy by which to
access them.
A service rule defines a TCP or UDP port reservation
Provides a way for applications running in containers to
connect
Use labels
39
42. Openstack Magnum
Container as a service
Conductor
Uses OpenStack Heat to deploy VM’s with kubernetes
Uses Docker API
Uses Kubernetes API (or other container orchestrator)
If you are interesting , just try it !
42