Knowledge Bank - ganeshahv/Contrail_SRE GitHub Wiki
             Virtualization Fundamentals
- System resources like mnt, pid and network can be virtualized with namespaces.
 
- On Linux we can limit process resources with Control Groups.
 
- We can transparently overlay two or more directories, stacked one over another with UnionFS.
 
- With chroot we change the root directory of a process and its children started with chroot.
 
- FreeBSD jails may prevent a chroot type attack.
 
- OpenVZ containers run Linux.
 
- Cgroup, multiple Linux hosts in namespaces for isolation are not supported by LXC.
 
- Systemd manages containers created with systemd-nspawn.
 
- The App Container standard specifies App Container Image, App Container Pod, App Container Image Discovery, App Container Executor.
 
- The Open Container Initiative includes specifications for Runtime and Image Format.
 
- Running a container with runc does not require a daemon process.
 
- Docker daemon manages runc containers through containerd.
 
- Docker client communicates with Docker daemon using REST APIs.
 
- A rkt pod can point to one or more applications
 
- Docker Desktop on Mac and Windows allows the mounting of a host directory inside a container.
 
- Docker Desktop installs Docker Compose, Command Line Client and Docker Engine.
 
- Docker Client is capable of communicating with a remote Docker Daemon.
 
- A container image is mapped to a running container in Read-Only mode.
 
- The command 
docker container commit creates an on-disk copy of a container’s ephemeral storage. 
- Docker images are versioned with Image Tag.
 
- Rkt downloads a container image with 
rkt fetch. 
- Dockerfile is the source of the instructions used by Buildah to create images.
 
- There are similarities between Podman commands and Docker.
 
- With Docker, a container can be referred by its name, ID and partial ID.
 
- With rkt we can create a Pod from a Docker container image.
 
docker container inspect and podman container inspect can be used to display detailed information about a container. 
- While creating a container, we create a process on the host running the container runtime.
 
docker container commit and rkt export help to create a new image from a container or Pod. 
- A container image is not a runtime object.
 
- Build from scratch or From a running container or Image conversion are all image creation methods.
 
- Containers can be created from images, and images can be created from containers.
 
- A container image can be created from a running container, a base container image, a File containing a set of instructions.
 
- We can share Containerfiles or Dockerfiles to enable image builds.
 
- Dockerfiles and Containerfiles include build time instructions like SHELL, FROM and RUN.
 
- Dockerfiles and Containerfiles include run time instructions like CMD and ENTRYPOINT.
 
- Docker uses bridge network driver by default to connect containers.
 
- Docker uses Container Network Model(CNM).
 
docker network inspect displays network information. 
- Containers can share a network namespace on the same system.
 
- ptp, bridge, macvlan, ipvlan are built-in network types of rkt.
 
- CRI-O uses Container Network Interface (CNI).
 
- If we delete an existing file from a container, the file does not get deleted from the base container image storage layer.
 
- We use Host volumes to mount a host directory inside a Pod with rkt.
 
overlayfs is the default storage driver for CRI-O. 
Kubernetes Fundamentals
- One or more containers, Shared IP address and One namespace are part of a Pod.
 
- Google developed Borg as an internal project.
 
- Objects and the state of the cluster are stored in etcd.
 
- Watch-loops or controllers interrogate the kube-apiserver or kubelet for a particular object state.
 
- kubeadm command is used to create a cluster and add nodes.
 
- kubectl is the main binary for working with objects of a Kubernetes cluster.
 
- There can be one pod networks per cluster.
 
- The kube config file contains Endpoints, SSL keys and Contexts.
 
- Pod is the smallest object or unit we can work with in Kubernetes.
 
- Only one IP addresses can be configured for a Pod.
 
- kube-apiserver is the main configuration agent on a master server.
 
- kubelet is the main agent on a worker node.
 
- Service connects other resources together and handles Ingress and Egress traffic.
 
- Kubernetes uses a RESTful API-driven architecture, accepting standard HTTP verbs.
 
- Annotations allow for metadata to be included with an object that may be helpful outside the Kubernetes object interaction.
 
- kind, metadata, apiVersion and spec must be included in a pod template.
 
- --all-namespaces should be appended to the command in order to affect every namespace with kubectl.
 
- All API versions should not be considered stable.
 
- Deployment is the suggested object for deploying and scaling an application.
 
- Container, Pod, ReplicaSet, Deployment is the correct order of Kubernetes objects.
 
- DaemonSet runs one pod on each node.
 
- Horizontal Pod Autoscaling scales resources based on CPU usage (50% by default).
 
- Jobs and CronJobs belong to the batch api group.
 
- replicas is a deployment value which determines the number of duplicate Pods deployed.
 
- 
- selector* is a header value having to do with updating Pods.
 
 
- 
- label* metadata is used to select an object with kubectl, based on an arbitrary string, regardless of the object type.
 
 
- We pass history to the kubectl rollout command to view object revisions.
 
- We pass undo to the kubectl rollout command in order to return to a previous version.
 
- ClusterIP, NodePort, LoadBalancer and ExternalName are Kubernetes service types.
 
- kube-proxy watches the API server for configuration changes and iptable updates.
 
- LoadBalancer spreads packets among Pods in a Deployment automatically.
 
- kubectl proxy starts a local proxy, which is useful for development and testing.
 
- Applications need not use persistent storage.
 
- Deployment uses a Persistent Volume Claim.
 
persistentVolumeReclaimPolicy determines what happens to persistent storage upon release. 
- A Secret contains encoded and not encrypted data.
 
- ConfigMaps can be created from Literal values, Individual files or Multiple files in the same directory.
 
- Efficiency is the main reason to use an Ingress Controller instead of multiple services.
 
- Both L4 and L7 can be configured in Ingress controllers.
 
- Multiple schedulers can be deployed at the same time.
 
- When a node has been tainted, a Pod requires toleration to be deployed on that node.
 
- All taints do not cause Pods to stop running on a node.
 
- Kubernetes does not have built-in cluster-wide logging.
 
- If a container does not provide logging, a Sidecar container could be used to generate and handle logging in the Pod.
 
- We use Custom Resource Definition when adding a new API object to kube-apiserver.
 
- We use Aggregated APIs to add a new API server to the cluster acting as a subordinate to kube-apiserver.
 
- Chart is the template that describes the application to deploy, configurations, and dependencies.
 
- A chart deployment output tells us about missing dependencies.
 
- Tiller is the agent that deploys objects based on a chart.
 
- A collection of charts called a Repository.
 
kube-apiserveraccepts the --authorization-mode option to change the authorization tool in use.