Skip to main content

2021 | Buch

Kubernetes

Preparing for the CKA and CKAD Certifications

insite
SUCHEN

Über dieses Buch

Master all the concepts and tools necessary to start administering a Kubernetes cluster and deploying applications to production. You will cover the entire curricula of the two Kubernetes certifications (for application developers and administrators).

The initial chapters guide you through deployment of a Kubernetes cluster on virtual machines and explore the different components of the control plane. Next, you will work with the kubectl command-line tool; namespaces, labels, selectors, and annotations—common resources used through the Kubernetes API. The following chapters describe the principle of controllers and detail how workload controllers work as well as the possibilities for configuring deployed applications.

You will also learn how to deploy a scalable and self-healing application, how pods are scheduled to nodes, how parts of the application can communicate, and how the application is discoverable from the outside. Next, you will cover security concerns describing the different authentication methods, the RBAC authorization mode, security contexts, network policies, and how to secure container images. You will also cover using persistent volumes for your containers to store long-term data, monitoring your clusters and applications and implementing design patterns for multi-container pods. The concluding chapters guide you through the upgrade of your deployed cluster.

After reading this book, you will have enough knowledge to deploy a complex application using a Kubernetes cluster and be ready for the certification exams.

What You Will Learn

Deploy a Kubernetes cluster with kubeadm and learn how the control plane worksDiscover how the Kubernetes API is structuredDeploy secure, auto-scaled, and self-healing applicationsMaster the kubectl command-line tool

Who This Book Is For

Administrators and application developers with good knowledge of micro-services development and deployment.

Inhaltsverzeichnis

Frontmatter
Chapter 1. Creating a Cluster with kubeadm
Abstract
In this chapter, you will deploy a Kubernetes cluster on virtual machines (VMs) in Google Cloud.
Philippe Martin
Chapter 2. Control Plane Components
Abstract
The Kubernetes control plane is composed of
Philippe Martin
Chapter 3. Accessing the Cluster
Abstract
In the previous chapters, you have installed kubectl on the Kubernetes hosts and used it from these hosts. The usual way of using the kubectl command is to install it on your development machine.
Philippe Martin
Chapter 4. Kubernetes Resources
Abstract
Kubernetes works in a declarative way: you create resources with the help of the Kubernetes API, these objects are stored in the etcd store, and controllers work to ensure that what you declared in these objects is correctly deployed in your infrastructure.
Philippe Martin
Chapter 5. The Workloads
Abstract
The Pod is the masterpiece of the Kubernetes cluster architecture.
Philippe Martin
Chapter 6. Configuring Applications
Abstract
An application can be configured in different ways:
Philippe Martin
Chapter 7. Scaling an Application
Abstract
We have seen in the spec of the ReplicaSet and Deployment a replicas field. This field indicates how many replicas of a pod should be running.
Philippe Martin
Chapter 8. Application Self-Healing
Abstract
When you start a Pod on a cluster, it is scheduled on a specific node of the cluster. If the node, at a given moment, is not able to continue to host this Pod, the Pod will not be restarted on a new node – the application is not self-healing.
Philippe Martin
Chapter 9. Scheduling Pods
Abstract
When you want to run a Pod into a Kubernetes cluster, you generally do not specify on which node you want the Pod to run. This is the job of the Kubernetes scheduler to determine on which node it will be running.
Philippe Martin
Chapter 10. Discovery and Load Balancing
Abstract
When you deploy a Pod, it is not easily accessible. If you define a Pod with several containers, these containers will be available to communicate via the localhost interface, but containers of a Pod won’t be able to communicate with containers of another pod without knowing the IP address of the other Pod.
Philippe Martin
Chapter 11. Security
Abstract
Kubernetes is a secured system: you first need to be authenticated, as a normal user or as a service account; then, an authorization system validates that you have the rights to perform the requested operations.
Philippe Martin
Chapter 12. Persistent Volumes
Abstract
A persistent volume (PV) is a storage resource provisioned by the cluster administrators. The provisioning can be manual or automatic.
Philippe Martin
Chapter 13. Multi-container Pod Design Patterns
Abstract
A Pod is the minimal piece deployable in a Kubernetes cluster. A Pod can contain one or several containers.
Philippe Martin
Chapter 14. Observability
Abstract
When working with Kubernetes, observability is crucial. Kubernetes is made of an important quantity of moving parts, and you will need tools to understand what is happening or what happened between these different parts.
Philippe Martin
Chapter 15. Upgrading the Cluster
Abstract
Upgrading the Kubernetes cluster is done in two phases. You first upgrade the control plane nodes and then the worker nodes. It is possible to upgrade to the next minor release or to any other next patch release of the same minor release. For example, when your cluster is using the version 1.18.6, you could upgrade to 1.18.p where p >= 7 and to 1.19.x (whatever the value of x), but not to 1.20.x.
Philippe Martin
Chapter 16. Command-Line Tools
Abstract
kubectl is the command-line tool used to work on Kubernetes clusters. You can use it to create application resources and cluster resources, interact with running containers, and manage the cluster.
Philippe Martin
Backmatter
Metadaten
Titel
Kubernetes
verfasst von
Philippe Martin
Copyright-Jahr
2021
Verlag
Apress
Electronic ISBN
978-1-4842-6494-2
Print ISBN
978-1-4842-6493-5
DOI
https://doi.org/10.1007/978-1-4842-6494-2