Skip to content

Commit f51b93f

Browse files
Fix indentations, format code pieces and answer some questions
1 parent 45e79a0 commit f51b93f

File tree

1 file changed

+70
-59
lines changed

1 file changed

+70
-59
lines changed

Interview/Dev-ops-Interview.md

Lines changed: 70 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
- Q18) Draw a comparison between Asset Management and Configuration Management.
198198
- A: The process of monitoring as well as maintaining things of value to an entity or group is called an Asset Management.
199199

200-
- Configuration Management refers to the process of controlling, identifying, planning for, and verifying the configuration items within service in support of Change Management.
200+
- Configuration Management refers to the process of controlling, identifying, planning for, and verifying the configuration items within service in support of Change Management.
201201

202202
- Q19) Can you state and explain various key elements of continuous testing?
203203
- A: Various key elements of continuous testing are:
@@ -210,17 +210,17 @@
210210
- Test optimization – Improve the overall testing process
211211

212212
- Q20) Please explain the core operations of DevOps in terms of development and infrastructure.
213-
- A: Core operations of DevOps in terms of development and infrastructure are:
214-
215-
- Application development – Developing a product that is able to meet all customer requirements and offers a remarkable level of quality
216-
- Code coverage – Measurement of the total number of blocks or lines or arcs of the code executed while the automated tests are running
217-
- Code developing – Prepare the code base required for the product development
218-
- Configuration – Allowing the product to be used in an optimum way
219-
- Deployment – Installing the software to be used by the end-user
220-
- Orchestration – Arrangement of several automated tasks
221-
- Packaging – Activities involved when the release is ready for deployment
222-
- Provisioning – Ensuring that the infrastructure changes arrive just-in-time with the code that requires it
223-
- Unit testing – Meant for testing individual units or components
213+
- A: Core operations of DevOps in terms of development and infrastructure are:
214+
215+
- Application development – Developing a product that is able to meet all customer requirements and offers a remarkable level of quality
216+
- Code coverage – Measurement of the total number of blocks or lines or arcs of the code executed while the automated tests are running
217+
- Code developing – Prepare the code base required for the product development
218+
- Configuration – Allowing the product to be used in an optimum way
219+
- Deployment – Installing the software to be used by the end-user
220+
- Orchestration – Arrangement of several automated tasks
221+
- Packaging – Activities involved when the release is ready for deployment
222+
- Provisioning – Ensuring that the infrastructure changes arrive just-in-time with the code that requires it
223+
- Unit testing – Meant for testing individual units or components
224224

225225
- Q21) What Do You Know about DevOps?
226226

@@ -290,9 +290,6 @@
290290

291291
- Start by talking about the age-old mechanisms of writing commands onto script files and testing them in a separate environment before deployment and how this approach is being replaced by IaC. Similar to the codes written for other services, with the help of AWS, IaC allows developers to write, test, and maintain infrastructure entities in a descriptive manner, using formats such as JSON or YAML. This enables easier development and faster deployment of infrastructure changes.
292292

293-
- Go through this Simplilearn video on “DevOps Interview Questions” delivered by our DevOps certification expert that will help you crack any interview.
294-
295-
296293

297294
- Q32) What are the success factors for Continuous Integration?
298295
- Examples of answers:
@@ -309,17 +306,17 @@
309306

310307
- Q33) How would you implement CI (continuous delivery) - end to end, including source control, branches, tools, etc. ?
311308

312-
- Q34) What is Continious Delivery? Continious Deployment?
309+
- Q34) What is Continuous Delivery? Continuous Deployment?
313310

314-
- Q35) What is the difference between Continuous Integration, Continious Delivery and Continious Deployment?
311+
- Q35) What is the difference between Continuous Integration, Continuous Delivery and Continuous Deployment?
315312

316-
- Q36) What’s the difference between git and github ? What about git and SVN ?
313+
- Q36) What is the difference between git and github ? What about git and SVN ?
317314

318315
- Q37) What is git rebase?
319316

320317
- Q38) In Git how do you revert a commit that has already been pushed and made public?
321318

322-
- Q39) What is puppet/chef/ansible used for? What are the advantages over shell scripts ?
319+
- Q39) What is puppet/chef/ansible used for? What are the advantages over shell scripts ?
323320

324321
- Q40) What do you understand by “Infrastructure as code”? How does it fit into the DevOps methodology? What purpose does it achieve?
325322

@@ -373,7 +370,6 @@
373370
- Feature branching vs trunk based development
374371
- Advantages of requiring pull requests and approvals
375372

376-
- Q11) More on Front-end Developer Job Interview Questions
377373

378374

379375
***********
@@ -526,11 +522,18 @@
526522

527523

528524
- Q1) What is the importance of SSL?
525+
- A: Using SSL ensure the security of the communication between server and client by encrypting the messages going bothways making sure even if the message are intercepted the attacker wouldn't be able to decrypt the messages.
529526

530527
- Q2) What is a SQL injection?
528+
- A: an attack that targets SQL database management systems by injecting SQL queries in a way that they are executed by the database. The goal is to manipulate the application's SQL query logic to gain unauthorized access to the database or retrieve, modify, or delete data.
531529

532530
- Q3) What is cross-site scripting (XSS)?
533-
531+
- A: a web security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. It occurs when a web application allows user input to be included in a web page without proper validation or escaping.
532+
- Stored XSS:
533+
Malicious scripts are permanently stored on the target server, and every user who views the affected page is exposed to the attack.
534+
- Reflected XSS:
535+
The injected script is reflected off a web server, such as in a URL, and executed immediately when the victim opens a manipulated link.
536+
534537
- Q4) Why shouldn’t you roll your own crypto?
535538

536539
- Q5) How are passwords stored on databases?
@@ -549,21 +552,29 @@
549552

550553
## Docker
551554

552-
- Q1) What is docker for?
555+
- Q1) What is docker used for?
556+
- A: Docker is a tool that allows the creation, deletion, running and storing containers.
553557

554-
- Q2) How to ask docker cli to show all containers&
558+
- Q2) How to show all containers on your system using docker?
559+
- A: `docker ps -a`
555560

556-
- Q3) How to delete image with container, who use this image?
561+
- Q3) How to delete an image that is already being used by a container?
562+
- A: `docker rmi -f`
557563

558564
- Q4) What command help you to delete all old unused images?
565+
- A: `docker image prune -f`
559566

560567
- Q5) What is docker-compose? What is docker-compose.yml?
561568

562569
- Q6) How to expose ports in docker-compose file?
563570

564571
- Q7) How to reduce docker images?
572+
- Using Multistage builds
573+
- using minimal base images
574+
- use as few layers as possible by reducing/combining Dockerfile commands
565575

566576
- Q8) Where you can store docker images?
577+
- A: using a container registry like AWS ECR
567578

568579
- Q9) What is alpine and why we need it?
569580

@@ -573,78 +584,78 @@
573584
## kubernetes
574585

575586
- Q1) What is Kubernetes?
576-
-A: Kubernetes is an open-source container management tool that holds the responsibilities of container deployment, scaling & descaling of containers & load balancing. Being Google’s brainchild, it offers excellent community and works brilliantly with all the cloud providers. So, we can say that Kubernetes is not a containerization platform, but it is a multi-container management solution.
587+
- A: Kubernetes is an open-source container management tool that holds the responsibilities of container deployment, scaling & descaling of containers & load balancing. Being Google’s brainchild, it offers excellent community and works brilliantly with all the cloud providers. So, we can say that Kubernetes is not a containerization platform, but it is a multi-container management solution.
577588

578589
- Q2) How is Kubernetes related to Docker?
579-
-A: It’s a known fact that Docker provides the lifecycle management of containers and a Docker image builds the runtime containers. But, since these individual containers have to communicate, Kubernetes is used. So, Docker builds the containers and these containers communicate with each other via Kubernetes. So, containers running on multiple hosts can be manually linked and orchestrated using Kubernetes.
590+
- A: It’s a known fact that Docker provides the lifecycle management of containers and a Docker image builds the runtime containers. But, since these individual containers have to communicate, Kubernetes is used. So, Docker builds the containers and these containers communicate with each other via Kubernetes. So, containers running on multiple hosts can be manually linked and orchestrated using Kubernetes.
580591

581-
-Q3) What is Container Orchestration?
582-
-A: Consider a scenario where you have 5-6 microservices for an application. Now, these microservices are put in individual containers, but won’t be able to communicate without container orchestration. So, as orchestration means the amalgamation of all instruments playing together in harmony in music, similarly container orchestration means all the services in individual containers working together to fulfill the needs of a single server.\
592+
- Q3) What is Container Orchestration?
593+
- A: Consider a scenario where you have 5-6 microservices for an application. Now, these microservices are put in individual containers, but won’t be able to communicate without container orchestration. So, as orchestration means the amalgamation of all instruments playing together in harmony in music, similarly container orchestration means all the services in individual containers working together to fulfill the needs of a single server.\
583594

584-
-Q4) What do you know about clusters in Kubernetes?
585-
-A: The fundamental behind Kubernetes is that we can enforce the desired state management, by which I mean that we can feed the cluster services of a specific configuration, and it will be up to the cluster services to go out and run that configuration in the infrastructure.
595+
- Q4) What do you know about clusters in Kubernetes?
596+
- A: The fundamental behind Kubernetes is that we can enforce the desired state management, by which I mean that we can feed the cluster services of a specific configuration, and it will be up to the cluster services to go out and run that configuration in the infrastructure.
586597
So, as you can see in the above diagram, the deployment file will have all the configurations required to be fed into the cluster services. Now, the deployment file will be fed to the API and then it will be up to the cluster services to figure out how to schedule these pods in the environment and make sure that the right number of pods are running.
587598

588599
So, the API which sits in front of services, the worker nodes & the Kubelet process that the nodes run, all together make up the Kubernetes Cluster.
589600

590-
-Q5) How to do maintenance activity on the K8 node?
591-
-A:Whenever there are security patches available the Kubernetes administrator has to perform the maintenance task to apply the security patch to the running container in order to prevent it from vulnerability, which is often an unavoidable part of the administration. The following two commands are useful to safely drain the K8s node.
601+
- Q5) How to do maintenance activity on the K8s node?
602+
- A: Whenever there are security patches available the Kubernetes administrator has to perform the maintenance task to apply the security patch to the running container in order to prevent it from vulnerability, which is often an unavoidable part of the administration. The following two commands are useful to safely drain the K8s node.
592603

593-
kubectl cordon
594-
kubectl drain –ignore-daemon set
604+
`kubectl cordon`
605+
`kubectl drain –ignore-daemon set`
595606
The first command moves the node to maintenance mode or makes the node unavailable, followed by kubectl drain which will finally discard the pod from the node. After the drain command is a success you can perform maintenance.
596607

597608
Note: If you wish to perform maintenance on a single pod following two commands can be issued in order:
598609

599-
kubectl get nodes: to list all the nodes
600-
kubectl drain <node name>: drain a particular node
610+
`kubectl get nodes` to list all the nodes
611+
`kubectl drain <node name>` drain a particular node
601612

602-
-Q6) What is the role of Load Balance in Kubernetes?
603-
-A: Load balancing is a way to distribute the incoming traffic into multiple backend servers, which is useful to ensure the application available to the users.
613+
- Q6) What is the role of Load Balance in Kubernetes?
614+
- A: Load balancing is a way to distribute the incoming traffic into multiple backend servers, which is useful to ensure the application available to the users.
604615
In Kubernetes, as shown in the above figure all the incoming traffic lands to a single IP address on the load balancer which is a way to expose your service to outside the internet which routes the incoming traffic to a particular pod (via service) using an algorithm known as round-robin. Even if any pod goes down load balances are notified so that the traffic is not routed to that particular unavailable node. Thus load balancers in Kubernetes are responsible for distributing a set of tasks (incoming traffic) to the pods
605616

606-
-Q7) How to monitor the Kubernetes cluster?
607-
-A: Prometheus is used for Kubernetes monitoring. The Prometheus ecosystem consists of multiple components.
617+
- Q7) How to monitor the Kubernetes cluster?
618+
- A: Prometheus is used for Kubernetes monitoring. The Prometheus ecosystem consists of multiple components.
608619

609620
Mainly Prometheus server which scrapes and stores time-series data.
610621
Client libraries for instrumenting application code.
611622
Push gateway for supporting short-lived jobs.
612623
Special-purpose exporters for services like StatsD, HAProxy, Graphite, etc.
613624
An alert manager to handle alerts on various support tools
614625

615-
-Q8) Can you explain the differences between Docker Swarm and Kubernetes?
616-
-A: Below are the main difference between Kubernetes and Docker:
626+
- Q8) Can you explain the differences between Docker Swarm and Kubernetes?
627+
- A: Below are the main difference between Kubernetes and Docker:
617628

618629
The installation procedure of the K8s is very complicated but if it is once installed then the cluster is robust. On the other hand, the Docker swarm installation process is very simple but the cluster is not at all robust.
619630
Kubernetes can process the auto-scaling but the Docker swarm cannot process the auto-scaling of the pods based on incoming load.
620631
Kubernetes is a full-fledged Framework. Since it maintains the cluster states more consistently so autoscaling is not as fast as Docker Swarm.
621632

622-
-Q9) How can containers within a pod communicate with each other?
623-
-A: Containers within a pod share networking space and can reach other on localhost. For instance, if you have two containers within a pod, a MySQL container running on port 3306, and a PHP container running on port 80, the PHP container could access the MySQL one through localhost:3306.
633+
- Q9) How can containers within a pod communicate with each other?
634+
- A: Containers within a pod share networking space and can reach other on localhost. For instance, if you have two containers within a pod, a MySQL container running on port 3306, and a PHP container running on port 80, the PHP container could access the MySQL one through localhost:3306.
624635

625-
-Q10) Explain what is a Master Node and what component does it consist of?
626-
-A: The master node is the most vital component responsible for Kubernetes architecture
636+
- Q10) Explain what is a Master Node and what component does it consist of?
637+
- A: The master node is the most vital component responsible for Kubernetes architecture
627638
It is the central controlling unit of Kubernetes and manages workload and communications across the clusters
628639
The master node has various components, each having its process. They are:
629640
-ETCD
630641
-Controller Manager
631642
-Scheduler
632643
-API Server
633644

634-
ETCD (Cluster store):
635-
-This component stores the configuration details and essential values
636-
-It communicates with all other components to receive the commands and work in order to perform an action
637-
-It also manages network rules and posts forwarding activity
645+
- ETCD (Cluster store):
646+
-This component stores the configuration details and essential values
647+
-It communicates with all other components to receive the commands and work in order to perform an action
648+
-It also manages network rules and posts forwarding activity
649+
650+
- Controller Manager
651+
-It is responsible for most of the controllers and performs a task
652+
-It is a daemon which runs in a continuous loop and is responsible for collecting and sending information to API server
653+
-The key controllers handle nodes, endpoints, etc.
638654

639-
Controller Manager
640-
-It is responsible for most of the controllers and performs a task
641-
-It is a daemon which runs in a continuous loop and is responsible for collecting and sending information to API server
642-
-The key controllers handle nodes, endpoints, etc.
643-
644-
Scheduler:
645-
-It is one of the key components of the master node associated with the distribution of workload
646-
-The scheduler is responsible for workload utilization and allocating pod to a new node
647-
-The scheduler should have an idea of the total resources available as well as resources allocated to existing workloads on each node
655+
- Scheduler:
656+
-It is one of the key components of the master node associated with the distribution of workload
657+
-The scheduler is responsible for workload utilization and allocating pod to a new node
658+
-The scheduler should have an idea of the total resources available as well as resources allocated to existing workloads on each node
648659

649660

650661
**********************

0 commit comments

Comments
 (0)