Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
IoT Edge Computing with MicroK8s

You're reading from   IoT Edge Computing with MicroK8s A hands-on approach to building, deploying, and distributing production-ready Kubernetes on IoT and Edge platforms

Arrow left icon
Product type Paperback
Published in Sep 2022
Publisher Packt
ISBN-13 9781803230634
Length 416 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Karthikeyan Shanmugam Karthikeyan Shanmugam
Author Profile Icon Karthikeyan Shanmugam
Karthikeyan Shanmugam
Arrow right icon
View More author details
Toc

Table of Contents (24) Chapters Close

Preface 1. Part 1: Foundations of Kubernetes and MicroK8s
2. Chapter 1: Getting Started with Kubernetes FREE CHAPTER 3. Chapter 2: Introducing MicroK8s 4. Part 2: Kubernetes as the Preferred Platform for IoT and Edge Computing
5. Chapter 3: Essentials of IoT and Edge Computing 6. Chapter 4: Handling the Kubernetes Platform for IoT and Edge Computing 7. Part 3: Running Applications on MicroK8s
8. Chapter 5: Creating and Implementing Updates on a Multi-Node Raspberry Pi Kubernetes Clusters 9. Chapter 6: Configuring Connectivity for Containers 10. Chapter 7: Setting Up MetalLB and Ingress for Load Balancing 11. Chapter 8: Monitoring the Health of Infrastructure and Applications 12. Chapter 9: Using Kubeflow to Run AI/MLOps Workloads 13. Chapter 10: Going Serverless with Knative and OpenFaaS Frameworks 14. Part 4: Deploying and Managing Applications on MicroK8s
15. Chapter 11: Managing Storage Replication with OpenEBS 16. Chapter 12: Implementing Service Mesh for Cross-Cutting Concerns 17. Chapter 13: Resisting Component Failure Using HA Clusters 18. Chapter 14: Hardware Virtualization for Securing Containers 19. Chapter 15: Implementing Strict Confinement for Isolated Containers 20. Chapter 16: Diving into the Future 21. Frequently Asked Questions About MicroK8s
22. Index 23. Other Books You May Enjoy

Getting Started with Kubernetes

Kubernetes is an open source container orchestration engine that automates how container applications are deployed, scaled, and managed. Since it was first released 7 years ago, it has made great strides in a short period. It has previously had to compete with and outperform container orchestration engines such as Cloud Foundry Diego, CoreOS's Fleet, Docker Swarm, Kontena, HashiCorp's Nomad, Apache Mesos, Rancher's Cattle, Amazon ECS, and more. Kubernetes is now operating in an entirely different landscape. This indicates that developers only need to master one container orchestration engine so that they can be employed for 90% of container-related jobs.

The Kubernetes container orchestration framework is a ready-for-production open source platform built on Google's 15+ years of experience running production workloads, as well as community-contributed best-of-breed principles and concepts. Kubernetes divides an application's containers into logical units for easier administration and discovery. Containers (cgroups) have been around since early 2007 when they were first included in the mainline Linux kernel. A container's small size and portability allows it to host an exponentially higher number of containers than VMs, lowering infrastructure costs and allowing more programs to be deployed faster. However, until Docker (2013) came along, it didn't generate significant interest due to usability concerns.

Docker is different from standard virtualization; it is based on operating-system-level virtualization. Containers, unlike hypervisor virtualization, which uses an intermediation layer (hypervisor) to run virtual machines on physical hardware, run in user space on top of the kernel of an operating system. As a result, they're incredibly light and fast. This can be seen in the following diagram:

Figure 1.1 – Virtual machines versus containers

Figure 1.1 – Virtual machines versus containers

The Kubernetes container orchestration framework automates much of the operational effort that's necessary to run containerized workloads and services. This covers provisioning, deployment, scaling (up and down), networking, load balancing, and other tasks that software teams must perform to manage a container's life cycle. Some of the key benefits that Kubernetes brings to developers are as follows:

  • Declarative Application Topology: This describes how each service should be implemented, as well as their reliance on other services and resource requirements. Because we have all of this data in an executable format, we can test the application's deployment parts early on in development and treat it like programmable application infrastructure:
Figure 1.2 – Declarative application topology

Figure 1.2 – Declarative application topology

  • Declarative Service Deployments: The update and rollback process for a set of containers is encapsulated, making it a repetitive and automated procedure.
  • Dynamically Placed Applications: This allows applications to be deployed in a predictable sequence on the cluster, based on application requirements, resources available, and governing policies.
  • Flexible scheduler: There is a lot of flexibility in terms of defining conditions for assigning pods to a specific or a set of worker nodes that meet those conditions.
  • Application Resilience: Containers and management platforms help applications be more robust in a variety of ways, as follows:
    • Resource consumption policies such as CPU and memory quotas
    • Handling the failures using a circuit breaker, timeout, retry, and so on
    • Failover and service discovery
    • Autoscaling and self-healing
  • Self-Service Environments: These allow teams and individuals to create secluded environments for CI/CD, experimentation, and testing purposes from the cluster in real time.
  • Service Discovery, Load Balancing, and Circuit Breaker: Without the use of application agents, services can discover and consume other services. There's more to this than what is listed here.

In this chapter, we're going to cover the following main topics:

  • The evolution of containers
  • Kubernetes overview – understanding Kubernetes components
  • Understanding pods
  • Understanding deployments
  • Understanding StatefulSets and DaemonSets
  • Understanding jobs and CronJobs
  • Understanding services
You have been reading a chapter from
IoT Edge Computing with MicroK8s
Published in: Sep 2022
Publisher: Packt
ISBN-13: 9781803230634
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime