- Introduction to Kubernetes features
- A look at Kubernetes Networking and Service Discovery
- New features in Kubernetes 1.6
- Kubernetes Installation options
To know more about our Kubernetes expertise, visit our center of excellence at: http://www.opcito.com/kubernetes/
2. 2
Show of hands
• Plan to use containers?
• How many use containers?
• Where do you use containers?
• Development
• Staging
• Production
3. 3
Agenda
• Introduction to Kubernetes features
• A look at Kubernetes Networking and Service Discovery
• New features in Kubernetes 1.6
• Kubernetes Installation options
4. 4
Kubernetes provides orchestration for containers along with
scheduling and service discovery
• Automate the deployment and replication of containers
• Auto scaling of your containers - scale in or out containers on
the fly
• Organize containers in to groups and provide automatic load
balancing between them via Labels
• Easily roll out new versions of application containers and
redirect traffic to the new versions
• Provide container resilience, if a container dies it gets replaced
via Replication Controllers
Kubernetes - Features
6. 6
• Cluster
• Set of nodes where Kubernetes is installed. Can be baremetal or
VMs
• Pods
• Group of co-located containers representing an application
• Smallest unit that can be scheduled within Kubernetes
• Containers share the same network namespace within a Pod
• Ephemeral not permanent
• Labels
• User defined key/value tags used to attach attributes to Pods
• Used to group pods in to logical groups
• Used by Replication controllers and Services to find Pods
Kubernetes Core Concepts
7. 7
• Scheduler
• Schedules pods to run on nodes
• Global scheduler for long running jobs
• Best fit chosen based on pod requirements
• Pluggable
• Replication Controllers
• Ensure a certain number of Pods are running always
• Replaces pods that die automatically
• Can be used to scale up and down a set of labelled pods
• Services
• Defines a set of Pods and a policy to access them
• Abstraction to allow transparent handling of the ephemeral
nature of the Pods
• Provides auto load balancing over a set of labelled pods
Kubernetes Core Concepts contd -/
15. 15
• Replica Set
• Next generation Replication Controller
• Uses different selector support – Set based
• Mainly used internally with Deployments
• Deployments
• Used to update Pods and Replica Sets
• Can create new resources or update existing resources
• Rate of update can be controlled. So, you get a rolling update
across all your containers
• Allows rolling back of updates, can stop a bad deployment
automatically
Replica Sets and Deployment Sets
16. 16
• Stateful Sets
• Provides a unique identity to pods
• Useful when you need stable network ids, persistent storage
• Ordered deployment scaling and termination
• Pod Identity persists over pod reschedules
• Daemon Sets
• Used to run a pod on all (or some) Nodes
• Primarily used to run storage, log collection or node monitoring
deamons
Stateful Sets and Daemon Sets
17. 17
• Node
• A node is a worker machine in Kubernetes
• May be a VM or physical machine
• Runs the following services
• Container Runtime (Docker, Rkt)
• Kubelet
• Kube-proxy
• Kubernetes Master
• Unified view of the cluster
• Runs API server
• Controllers like Replication, StatefulSet , ReplicaSet, DeamonSet,
Deployment live here
Kubernetes Master and Nodes(Minions)
24. 24
• Kubernetes creates Docker Link compatible environment
variables in all Pods
• Containers can use the environment variable to talk to the
service endpoint
Service Discovery – Environment variables
25. 25
• The DNS server watches Kubernetes API for new Services
• The DNS server creates a set of DNS records for each Service
• Services can be resolved by the name within the same
namespace
• Pods in other namespaces can access the Service by adding the
namespace to the DNS path
• my-service.my-namespace
Service Discovery – DNS
30. 30
• Scale and Federation
• 5000 nodes (150,000 pods)
• etcd v3
• Federation for multiple clusters via kubefed
• Security
• RBAC
• Permissions can be scoped on a per name-space basis
• Control plane components
• Nodes
• Controllers
What’s new in 1.6?
31. 31
• Advanced Scheduling
• Node affinity/anti-affinity
• Taints and tolerations
• Pod affinity/anti affinity
• Multiple schedulers
• Dynamic Storage provisioning
• No need to pre-provision, create and delete on demand
• Default installation of Storage class for AWS, Azure, GCP,
OpenStack and vSphere
• Expanded range of storage, including user-written PV
provisioners
What’s new in 1.6?
32. 32
• Per pod eviction
• In case of node problems combined with tolerationSeconds, lets
users tune the duration a pod stays bound to a node that is
experiencing problems
• Pod Injection Policy
• Adds a new API resource PodPreset to inject information such as
secrets, volumes, volume mounts, and environment variables
into pods at creation time
• Custom Metrics support in the Horizontal Pod Autoscaler
What’s new in 1.6? – Alpha features
33. 33
• Kubeadm
• Ships with Kubernetes
• Assumes machines are up and running
• Integrates with your existing orchestration system
• GCE
• One click ready to use clusters
• Kops
• Fully automated installation
• Uses DNS to identify clusters
• Self-healing: everything runs in Auto-Scaling Groups
• Limited OS support (Debian preferred, Ubuntu 16.04 supported,
early support for CentOS & RHEL)
• High-Availability support
• Can directly provision, or generate terraform manifests
Kubernetes Installation