KUBERNETES
A Simple Guide to Master Kubernetes for Beginners and Advanced Users
(2020 Edition)
Brian Docker
Copyright 2019 - All rights reserved.
The content contained within this book may not be reproduced, duplicated or transmitted without direct written permission from the author or the publisher.
Under no circumstances will any blame or legal responsibility be held against the publisher, or author, for any damages, reparation, or monetary loss due to the information contained within this book, either directly or indirectly.
Legal Notice:
This book is copyright protected. It is only for personal use. You cannot amend, distribute, sell, use, quote or paraphrase any part, or the content within this book, without the consent of the author or publisher.
Disclaimer Notice:
Please note the information contained within this document is for educational and entertainment purposes only. All effort has been executed to present accurate, up to date, reliable, complete information. No warranties of any kind are declared or implied. Readers acknowledge that the author is not engaging in the rendering of legal, financial, medical or professional advice.
The content within this book has been derived from various sources. Please consult a licensed professional before attempting any techniques outlined in this book.
By reading this document, the reader agrees that under no circumstances is the author responsible for any losses, direct or indirect, that are incurred as a result of the use of the information contained within this document, including, but not limited to, errors, omissions, or inaccuracies.
TABLE OF CONTENTS
Introduction
At the core of containers are features called control groups (or cgroups). Cgroups are important because they allow the host to limit and also share resources that each container utilizes. This is important for several reasons, including proper allocation of resources to ensure that each container functions smoothly
It also impacts security and prevents certain attacks, such as denial-of-service attacks. A distributed denial-of-service attack, or DDoS, is a cyberattack in which the attacker removes access to a certain machine or software.
This way, the real owner of those components might find out that the work he or she has been performing becomes unavailable to him or her. This allows the attacker to carry out changes, install malicious software, and cause other forms of harm. In some cases, they can indefinitely disrupt the services of the host.
But those are not the only benefits that containers are able to provide. Containers allow for easy application creation and their deployment. Containers can increase efficiency and make work faster for the developer.
Containers are also able to provide constant development, integration, and deployment features. This allows developers to receive reliable and frequent build and deployment. They are also able to perform their tasks with quick and easy rollbacks.
When developers are using containers, they have a certain consistency across platforms. They can run, test, and produce their applications the same way on the laptop or other computing device as they do in the cloud. This is because they have access to the containers no matter where they access them from.
Resources are isolated and this allows for users to predict the performance of the application. When they are able to predict performance, they can make corrections whenever necessary and are able to get an overall idea of what the end result might turn out to be.
There is more efficiency in the way the resources are utilized as well. Typically, working outside of containers might lead to wasting resources, but containers ensure that applications work with a specific number of resources.
While recognizing some of the features of containers, it is also important to grasp the concept of namespace. Namespace is an important feature in Kubernetes that allots resources to various containers. It also connects various processes together.
This allows different processes to interact with each other efficiently. Namespaces also place a limit on the level of visibility that one process has on other ID components, filesystems, and networking. A container process then becomes restricted. This allows for each container to work independently without any outside influence or effects, which could affect the integrity and quality of the process.
Furthermore, users can also utilize union file systems. To understand what a union is, we have to look at the game Tetris. This might take you by surprise, but there is a reason for using this example. What union does is take the files and directories of different file systems and creates one single file system comprising of the individual file systems.
Think of each file system as one part of a Tetris block. Each block is of a different shape, but if you get them together, they form straight rows. However, if you break apart the rows, you can still get the individual parts. This is the same with union. You can still utilize each of the individual components, but they are all stacked together to form a single file system.
This is convenient because having different file systems means that work becomes more complicated and it is longer to perform a task.
So the big question is, why should you use Docker?
Containers on their own are not a new technology and have actually been around for many years. There are many applications that can run it. However, what truly sets Docker apart from other applications is the ease of use it has brought to the community. Docker promotes the use of Continuous Deployment and Continuous Integration.
This means that even when you have to troubleshoot something or there are certain updates you have to run, there is no delay in progress. These methods, when utilized properly, can have a great impact on your software products results and quality.
Chapter 1. How Kubernetes Operates
Kubernetes ' element is that the audience. A cluster consists of machines or virtual, which each serves a role as a node or as a master. Each node hosts collections of a couple of containers (which comprise your software), and also, the master communicates with nodes around when to make or ruin containers. It educates nodes to re-route traffic according to fresh container alignments.
The Kubernetes master
The Kubernetes master is your access point (or the controller airplane) by which administrators and other users to interact together with the bunch to deal with the scheduling and installation of containers. A bunch will have a minimum of one master but might have more based on the replication pattern of the cluster.
The master stores the configuration and nation information for your bunch in ectd, a continuous and information that is dispersed store. Every node has access, and via it, nodes know how to keep the configurations.
It is possible to operate, etc. Experts communicate with the rest of the audience the entry point into the management airplane, tube-apiserver.
By way of instance, the kube-API server makes certain that configurations from the, etc. Match configurations of containers set up from the bunch. Control loops are handled that by the kube-controller-manager handle the audience via the Kubernetes API server's condition. Replicas deployments and nodes have controls.
By way of instance, the control is responsible for tracking its health and registering a node. The tracks and handled workloads from the bunch kube-scheduler. This service assigns a function to nodes and keeps track of the resources and capacity of both nodes. The cloud-controller-manager is a service Kubernetes which can help maintain it cloud-agnostic.