The Kubernetes Book
Rate it:
Open Preview
Read between March 5 - March 10, 2021
8%
Flag icon
#KubernetesMoment:
8%
Flag icon
Kubernetes this Month:
10%
Flag icon
etcd prefers consistency over availability. This means that it will not tolerate a split-brain situation and will halt updates to the cluster in order to maintain consistency.
10%
Flag icon
etcd uses the popular RAFT consensus algorithm to accomplish this.
12%
Flag icon
Cluster DNS is based on CoreDNS
14%
Flag icon
Keeping it high level, you ring-fence an area of the host OS, build a network stack, create a bunch of kernel namespaces, and run one or more containers in it. That’s a Pod.
14%
Flag icon
seriously consider using a service mesh to secure traffic between Pods and application services.
15%
Flag icon
Examples of higher-level controllers include; Deployments, DaemonSets, and StatefulSets.
15%
Flag icon
Behind the scenes, Deployments, DaemonSets and StatefulSets implement a controller and a watch loop that is constantly observing the cluster making sure that current state matches desired state.
15%
Flag icon
Service – it’s a stable network abstraction point that provides TCP and UDP load-balancing across a dynamic set of Pods.
15%
Flag icon
Ingress, which understands HTTP and provides host and path-based routing.
16%
Flag icon
Services bring stable IP addresses and DNS names to the unstable world of Pods.
16%
Flag icon
The Pod is the basic building-block. Deployments add self-healing, scaling and updates. Services add stable networking and load-balancing.
21%
Flag icon
At a high-level, kubectl converts user-friendly commands into the JSON payload required by the API server.
22%
Flag icon
An infrastructure-centric use-case for multi-container Pods is a service mesh. In the service mesh model, a proxy container is inserted into every application Pod. This proxy container handles all network traffic entering and leaving the Pod, meaning it is ideally placed to implement features such as traffic encryption, network telemetry, intelligent routing, and more.
23%
Flag icon
If you’re using Docker as the container runtime, a Pod is actually a special type of container called a pause container.
24%
Flag icon
Each container in a Pod shares the Pod’s entire network namespace – IP, localhost adapter, port range, routing table, and more.
24%
Flag icon
All containers in a Pod have access to the same volumes, the same memory, the same IPC sockets, and more.
24%
Flag icon
it’s possible for two containers in the same Pod to have their own set of cgroup limits.
25%
Flag icon
Singleton Pods are not reliable!
26%
Flag icon
It’s not good practice to use the default namespace in the real world,
26%
Flag icon
“A Strong Belief, Loosely Held: Bringing Empathy to IT”.
28%
Flag icon
The -it flags make the exec session interactive and connects STDIN and STDOUT on your terminal to STDIN and STDOUT
29%
Flag icon
The process on the worker node that accepts the PodSpec is the kubelet.
29%
Flag icon
behind-the-scenes, Deployments leverage another object called a ReplicaSet.
31%
Flag icon
Kubernetes is constantly making sure that current state matches desired state.
37%
Flag icon
every Service gets its own stable IP address, its own stable DNS name, and its own stable port.
38%
Flag icon
Each Service that is created, automatically gets an associated Endpoints object. All this Endpoints object is, is a dynamic list of all of the healthy Pods on the cluster that match the Service’s label selector.
39%
Flag icon
Kubernetes supports several types of Service. The default type is ClusterIP.
42%
Flag icon
ClusterIP. This is the default option and gives the Service a stable IP address internally within the cluster. It will not make the Service available outside of the cluster.
42%
Flag icon
NodePort. This builds on top of ClusterIP and adds a cluster-wide TCP or UDP port. It makes the Service available outside of the cluster on a stable port.
42%
Flag icon
LoadBalancer. This builds on top of NodePort and integrates with cloud...
This highlight has been truncated due to consecutive passage length restrictions.
47%
Flag icon
Kubernetes automatically configures every container so that it can find and use the cluster DNS to convert Service names to IPs. It does this by populating every container’s /etc/resolv.conf file with the IP address of cluster DNS Service as well as any search domains that should be appended to unqualified names.
48%
Flag icon
A default gateway is where a device sends traffic that it doesn’t have a specific route for. The default gateway will normally forward traffic to another device with a larger routing table that might have a route for the traffic.
49%
Flag icon
The format of the FQDN is <object-name>.<namespace>.svc.cluster.local
62%
Flag icon
Storage Classes take things to the next level by allowing applications to dynamically request storage. You create a Storage Class object that references a class, or tier, of storage from a storage back-end. Once created, the Storage Class watches the API Server for new Persistent Volume Claims that reference the Storage Class. When a matching PVC arrives, the SC dynamically creates the storage and makes it available as a PV that can be mounted as a volume into a Pod (container).
79%
Flag icon
it is recommended to set automountServiceAccountToken to false for Pods that do not need to communicate with the API server.
87%
Flag icon
Pod Security Policies are a relatively new feature that allow you to define security settings at the cluster level.
90%
Flag icon
The most secure practical option is to host your own private registry within your own firewall.
94%
Flag icon
This is similar to BGP. BGP Routing happens through a network of peers that help each other find a route for packets to go from one Pod to another.
98%
Flag icon
Controller: Control plane process running as a reconciliation loop monitoring the cluster (via the API Server) and making the necessary changes so the observed state of the cluster matches desired state.