What Is the Kubernetes?
Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications. It groups containers that make up an application into logical units for easy management and discovery.
What is kubernetes and How to use it?
Kubernetes is an open-source platform designed to automate deploying, scaling, and operating application containers. With Kubernetes, you can quickly and efficiently respond to customer demand: Deploy your applications quickly and predictably.
What is a docker?
Docker container is an open source software development platform. Its main benefit is to package applications in “containers,” allowing them to be portable among any system running the Linux operating system (OS).
What is a cluster in kubernetes?
These master and node machines run the Kubernetes cluster orchestration system. A container cluster is the foundation of Container Engine: the Kubernetes objects that represent your containerized applications all run on top of a cluster.
What is a swarm in docker?
Docker Swarm is a clustering and scheduling tool for Docker containers. With Swarm, IT administrators and developers can establish and manage a cluster of Docker nodes as a single virtual system.
What is openshift?
OpenShift Online is Red Hat’s public cloud application development and hosting platform that automates the provisioning, management and scaling of applications so that you can focus on writing the code for your business, startup, or big idea.
What is a namespace in kubernetes?
Namespaces are intended for use in environments with many users spread across multiple teams, or projects. Namespaces are a way to divide cluster resources between multiple uses (via resource quota). In future versions of Kubernetes, objects in the same namespace will have the same access control policies by default.
What is a node in kubernetes?
A node is a worker machine in Kubernetes, previously known as a minion. A node may be a VM or physical machine, depending on the cluster. Each node has the services necessary to run pods and is managed by the master components. The services on a node include Docker, kubelet and kube-proxy.
What is a heapster?
Heapster is a cluster-wide aggregator of monitoring and event data. It supports Kubernetes natively and works on all Kubernetes setups, including our Deis Workflow setup.
What is a cluster of containers?
A container cluster is a set of Compute Engine instances called nodes. It also creates routes for the nodes, so that containers running on the nodes can communicate with each other. The Kubernetes API server does not run on your cluster nodes. Instead, Container Engine hosts the API server.
What is the kubelet?
Kubelet run pods. The unit of execution that Kubernetes works with is the pod. A pod is a collection of containers that share some resources: they have a single IP, and can share volumes.
What is minikube?
Minikube is a tool that makes it easy to run Kubernetes locally. Minikube runs a single-node Kubernetes cluster inside a VM on your laptop for users looking to try out Kubernetes or develop with it day-to-day.
What Is Kubectl?
kubectl is a command line interface for running commands against Kubernetes clusters. This overview covers kubectl syntax, describes the command operations, and provides common examples. For details about each command, including all the supported flags and subcommands, see the kubectl reference documentation.
What is the GKE?
Google Container Engine (GKE) is a management and orchestration system for Docker container and container clusters that run within Google’s public cloud services. Google Container Engine is based on Kubernetes, Google’s open source container management system.
What is K8s?
Kubernetes, also sometimes called K8S (K – eight characters – S), is an open source orchestration framework for containerized applications that was born from the Google data centers.
What is kube proxy?
Synopsis. The Kubernetes network proxy runs on each node. Service cluster ips and ports are currently found through Docker-links-compatible environment variables specifying ports opened by the service proxy. There is an optional addon that provides cluster DNS for these cluster IPs.
Which process runs on kubernetes master node?
Kube-apiserver process runs on Kubernetes master node.
Which process runs on kubernetes non-master node?
Kube-proxy process runs on Kubernetes non-master node.
Which process validates and configures data for the api objects like pods, services?
kube-apiserver process validates and configures data for the api objects.
What is the use of kube-controller-manager?
kube-controller-manager embeds the core control loop which is a non-terminating loop that regulates the state of the system.
What are kubernetes controllers?
Kubernetes controllers are Replicaset, Deployment controller.
Where kubernetes cluster data is stored?
etcd is responsible for storing Kubernetes cluster data.
What is the role of kube-scheduler?
kube-scheduler is responsible for assigning a node to newly created pods.
What are the components interact with kubernetes node interface?
Kubectl, Kubelet, and Node Controller components interacts with Kubernetes node interface.
How to monitor that a Pod is always running?
We can introduce probes. A liveness probe with a Pod is ideal in this scenario.
A liveness probe always checks if an application in a pod is running, if this check fails the container gets restarted. This is ideal in many scenarios where the container is running but somehow the application inside a container crash.
spec:
containers:
- name: liveness
image: k8s.gcr.io/liveness
args:
- /server
livenessProbe:
httpGet:
path: /healthz
How do you tie service to a pod or to a set of pods?
By declaring pods with the label(s) and by having a selector in the service which acts as a glue to stick the service to the pods.
kind: Service
apiVersion: v1
metadata:
name: my-service
spec:
selector:
app: MyApp
ports:
- protocol: TCP
port: 80
Let’s say if we have a set of Pods that carry a label “app=MyApp” the service will start routing to those pods.
What is ETCD in Kubernetes?
Etcd is a shop for the setup, state, and also metadata of Kubernetes collections. It is composed in Go shows language and also stands for the collection state at an offered factor in time. This datastore works as the foundation of dispersed systems.
How to Check health of etcd?
Using kubectl get --raw=/healthz/etcd
How to check status of node autoscaler?
Using kubectl describe configmap cluster-autoscaler-status -n kube-system
How to check pods which are not Runnning?
Using kubectl get pods --field-selector=status.phase!=Running --all-namespaces
How to check where is my pod running?
Using kubectl get pods -n sock-shop -l name=carts -o wide
What is Minikube?
Minikube is a tool that allows us to run a Kubernetes setup locally within a virtual machine. It lets us run a single-node Kubernetes cluster on our personal computer to try out Kubernetes or essential development work.
What is the syntax of kubectl?
kubectl has a syntax to use as follows:
kubectl [command] [TYPE] [NAME] [flags]
What are the kubectl Get Commands?
- kubectl get all
- kubectl get namespaces
- kubectl get configmaps
- kubectl get nodes
- kubectl get pods
- kubectl get rs
- kubectl get svc kuard
- kubectl get endpoints kuard
What are the types of Kubernetes Volume?
The types of Kubernetes volume are:
- EmptyDir
- GCE persistent disk
- Flocker
- HostPath
- NFS
- ISCSI
- Rbd
- PersistentVolumeClaim
- downwardAPI
What are the kubectl Logs?
Get logs.
kubectl logs -l app=kuard
Get logs for previously terminated container.
kubectl logs POD_NAME --previous
Watch logs in real time.
kubectl attach POD_NAME
Copy files out of pod (Requires tar binary in container).
kubectl cp POD_NAME:/var/log .
What is syntax of Kubectl Alias command?
For Linux
alias k=kubectl
For Windows
Set-Alias -Name k -Value kubectl
How can you get a static IP for a Kubernetes load balancer?
A static IP for the Kubernetes load balancer can be achieved by changing DNS records since the Kubernetes Master can assign a new static IP address.
How can a company deal with a monolithic codebase issue?
It is the transition of the monolithic codebase to a microservice design so that different microservices can be classified as containers. Then Kubernetes could be used for deploying and orchestrating the containers.
Which command is used to create and fetch the deployment?
To create: kubectl create –f Deployment.yaml –record
To fetch: kubectl get deployments
Which command is used to check the status of deployment and to update a deployment?
To check the status: kubectl rollout status deployment/Deployment.
To update a deployment: kubectl set image deployment/Deployment tomcat = tomcat:6.0
Can you explain Kube-proxy? And Syntax?
Kube-proxy is a network-proxy that runs on each and every node and also reflects as defined in the Kubernetes API. This proxy can also perform stream forwarding across a set of backends. It is one of the optional add-ons that provide the DNS cluster for the cluster APIs.
The syntax to configure Proxy is:
-
kube-proxy [flags]
What are minions in the Kubernetes cluster?
They are components of the master node.
They are the work-horse / worker node of the cluster.
They are monitoring engines used widely in kubernetes.
They are docker container services.
What are the differences between Kubernetes and Docker Swarm?
Kubernetes:
- Kubernetes provides an auto-scaling feature.
- Kubernetes installation is very complicated and time-consuming.
- GUI features are available.
- It provides a built-in load balancing technique.
- Load balancing settings are configured manually.
Docker Swarm:
- Docker swarm doesn’t provide any auto-scaling feature.
- Docker installation is very easy and fast.
- GUI features are not available.
- Services are maintained while updating with process scheduling
- Load balancing is automated.
What are the tools for Kubernetes Monitoring?
- Grafana
- Elastics stack
- Kube watch
- Jaager
- Sensu go
- Datadog
- Linkerd
- Replex
- Epsagon
- Prometheus
- Fluentd
What are the tools for Kube Cluster Deployment?
- Minikube
- Kubeadm
- Kops
- Kubespray
- Jaas
- Amazon eks
- Kube aws
- Conjure-up