Why ‘kubernetes’ service ?

Analysis: kubectl describe svc kubernetes ‘kubernetes’ is a clusterIP service. (ie can be accessed only inside the cluster.) It has no selector specified.( So no automatic LB.) But endpoints specified(maybe hardcoded) as 172.31.15.134:6443 ( that means all the requests to this service will be routed to 172.31.15.134:6443) Now you can see the its the IP and port corresponding to APIServer pod. Conclusion: So kubernetes service act as a service for APIServer Pod. Other pods inside the cluster like Scheduler, Controller

Read more

What is Pod in kubernetes. Explain 15 points with image as an example

It is an atomic scheduling unit in a Kubernetes cluster. It is a logical unit. Every container running in the cluster nodes will be wrapped up by the POD. In one POD there can be multiple container running. It is called tight coupling. Prefered way is run one container in one POD. It is called loose coupling. Each POD will have its own IP address. There will be POD nw connecting all the PODS in a cluster irrespective of the

Read more

What are the components of Kubernetes master and explain each component’s function?

API Server: All the incoming/outgoing communication with Kubernetes cluster happening through API Server. APIServer is a RESTful server. Workstations/Client uses Kubectl tool for communicating with the API Server. API Server expects the inputs in JSON format. All the communication with the Master node worker nodes are also happening through API Server. Scheduler/Controller Manager uses API Server for all the communications with the worker nodes. Authentication and authorization. Etcd: This is the storage mechanism Kubernetes Master node has. All the details

Read more

What are the components of Kubernetes worker and explain each component’s function?

Kubelet: Resides in each worker nodes. Registers the node to the master node. Instantiate the Pods. Container Runtime (Docker): For managing and running the containers. Kube-Proxy: It is a nw proxy. Implements nw rules on PODS. Fecilitate the communication with in the cluster and outside the cluster. All the networking related supports are done by this component. Can say like a virtual n/w card for the nodes. Responsible for assigning IP addresses and all.

Read more

Write down 10 features of Kubernetes with image.

Kubernetes is an Orchestrator for running containers.Kubernetes provides auto scalability.Kubernetes provides load balancing.Kubernetes provides self healing feature.Kubernetes provides automated rollouts and rollbacks.Kubernetes has persistant storage.Kubernetes provides service discovery.Kubernetes has secrets and config management.Kubernetes provides automatic bin packing.Kubernetes design follows microservice architecture.

Read more

List out number of storage/volume drivers supported by docker?

overlay2 overlay2 is the preferred storage driver for all currently supported Linux distributions, and requires no extra configuration. fuse-overlayfs fuse-overlayfsis preferred only for running Rootless Docker on a host that does not provide support for rootless overlay2. On Ubuntu and Debian 10, the fuse-overlayfs driver does not need to be used, and overlay2 works even in rootless mode. Refer to the rootless mode documentation for details. btrfs and zfs The btrfs and zfs storage drivers allow for advanced options, such as creating “snapshots”, but require more maintenance and setup. Each of these relies on

Read more

What is Docker Images and Exaplin in 10 bullet lines?

Docker image is a collection of files systems. It will have a ROOT FS, USR FS, APP FS. ONE Copy of Docker image get attached to each Container From one Image – you can get multiple Container. Docker uses storage drivers to store image layers, and to store data in the writable layer of a container.  Docker image file systems strcutured in a layerd way. All layers in a docker image is Read only. All layers in an image is

Read more

List out all INSTRUCTION statement of dockerfile and give one line explanation. – Draft

Dockerfile commands DOCKER file Commands Details 1 FROM Taking the base image 2 MAINTAINER Creater of the dockerfile 3 RUN Run command in the container of the previous layer 4 ARG Set a variable for the dockerfile and reuse it ${var}. Scope is only during the building process. 5 EXPOSE Specifying information port for the container 6 COPY Copy the files to the image 7 ADD/EXTRACT Extract + Copy compressed files to the image 8 USER Set a container the

Read more

Build all these 5 images and run container and observe the use cases of it.

https://devopsschool.com/tutorial/docker/dockerfile/dockerfile-example-sample-lab.html Docker File 1: /usr/sbin/apache2ctl specified in CMD will run in foreground as a blocking call. Docker File 2: Just exit after echoing “Hello world”. Docker File 3: Just exit after echoing “Hello”. Docker File 4: Same as ‘Docker File 1‘ except port 80 will be shown as exposed port. Docker File 5: Output will be print like : “Hello /bin/sh -c echo “Hello world””. First it will execute ENTRYPOINT then content of CMD will be passed as an arument

Read more

Write a example dockerfile with 2 CMD, 2 ENTRYPOINT and 1 CMD/1ENTRYPOINT and write down a behaviour of it.

Dockerfile with 2 CMD, 2 ENTRYPOINT: File content: Output: Welcome to /bin/sh -c echo “DOCKER” Observations: Both CMD and ENTRYPOINT entries will be overwritten with the latest entries. That is only the last CMD and ENTRYPOINT will be taken. Also the values specified in CMD will be add as an argument to the ENTRYPOINT command. Dockerfile with 1 CMD, 1 ENTRYPOINT: File content: Output: Hello World Observations: Values specified in CMD will be add as an argument to the ENTRYPOINT

Read more

What is Storage Driver and types of Storage Driver? Explained with Images.

Docker supports several storage drivers, using a pluggable architecture. The storage driver controls how images and containers are stored and managed on your Docker host. Docker uses storage drivers to store image layers Docker uses storage drivers to store data in the writable layer of a container. The container’s writable layer does not persist after the container is deleted, but is suitable for storing temp data generated at runtime. Storage drivers are optimized for space efficiency. But write speeds are

Read more

Explain What is Docker Container with image?

Docker Container: A running instance of docker container image. Docker Container Image: It is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings. Its basically a collection of file systems. It will have a ROOT FS, USER FS and one or more APP FS. Can use single container image to run multiple containers.

Read more