This webinar covered pods and replica sets in Kubernetes. Pods are the smallest deployable units that can contain one or more containers that always co-locate and share resources. Multi-container pods were demonstrated with a Python and Redis example. Replica sets ensure a specified number of pods are always running to provide high availability, replacing pods when failures occur. Attendees learned how to create and scale replica sets in a demo. Upcoming webinars will cover Kubernetes services.
Presentation on how to chat with PDF using ChatGPT code interpreter
A Closer Look at Kubernetes Pods and Replica Sets
1. Taking a Closer Look at
Pods and Replica Sets
Janakiram MSV
Analyst | Advisor | Architect
Janakiram & Associates
Google Developer Expert
Joseph Jacks
Sr. Director
Apprenda
Founder, KubeCon
2. Announcing
The Kubernetes Webinar Series
● Monthly webinar focused on helping you get started with Kubernetes
● Delivered by the experts from the container ecosystem
● Each webinar introduces a concept to accelerate your learning
● No specific prerequisites
○ Basic understanding of Docker will help
● All attendees will get $100 Google Cloud Platform Credits
● Win free annual and monthly subscriptions of MAPT eBook library
● The recording of this webinar will be available at Kubernetes.live
3. Objectives
● Understand the concept of Pods
● Explore multi-container Pods
● Closer look at use cases and scenarios for multi-container pods
● Scaling Pods through Replica Sets
4. What is Pod?
● A group of one or more containers that are always co-located and
co-scheduled that share the context
● Containers in a pod share the same IP address, ports, hostname and
storage
● Modeled like a virtual machine -
○ Each container represents one process
○ Tightly coupled with other containers in the same pod
● Pods are scheduled in Nodes
● Fundamental unit of deployment in Kubernetes
6. What is a Pod?
A multi-container pod that contains a file puller
and a web server that uses a persistent volume
for shared storage between the containers.
● Containers within the same pod
communicate with each other using IPC
● Containers can find each other via localhost
● Each container inherits the name of the pod
● Each pod has an IP address in a flat shared
networking space
● Volumes are shared by containers in a pod
7. Use Cases for Pod
● Content management systems, file and data loaders, local cache
managers, etc.
● Log and checkpoint backup, compression, rotation, snapshotting, etc.
● Data change watchers, log tailers, logging and monitoring adapters,
event publishers, etc.
● Proxies, bridges, and adapters
● Controllers, managers, configurators, and updaters
11. Replication Controller
● Ensures that a Pod or homogeneous set of Pods are always up and
available
● Always maintains desired number of Pods
○ If there are excess Pods, they get killed
○ New pods are launched when they fail, get deleted, or terminated
● Creating a replication controller with a count of 1 ensures that a Pod is
always available
● Replication Controller and Pods are associated through Labels
12. Replica Set
● Replica Sets are the next generation Replication Controllers
● Ensures specified number of pods are always running
● Pods are replaced by Replica Sets when a failure occurs
○ New pods are automatically scheduled
● Labels and Selectors are used for associating Pods with Replica Sets
● Usually combined with Pods when defining the deployment
14. Summary
● Pods are the smallest unit of deployment in Kubernetes
● Multiple containers share the context of a Pod
● Replica Sets are the next generation Replication Controllers
● Replication Controllers ensure high availability of Pods
● Scripts and source code for demos shown is available on Github
15. Upcoming Webinar
Understanding Services
9AM PST, Wednesday, Nov. 23rd
Services in Kubernetes act as the glue between various objects that
communicate with each other. In this webinar, we will learn how to use
Services to securely expose Pods to internal and external consumers.
This session builds upon the concepts of Pods, Replica Sets that were
covered in the previous webinars.
Register at kubernetes.live for the upcoming webinars