Common Questions in a Technical DevOps Interview
When applying for a job, almost everyone has to go through a technical interview as the first stage.
The next stage might be a take-home assignment, or it could be one or more additional technical interviews. The process can differ from company to company, but in any case it's worth studying the answers to the common questions in advance.
Today I'm publishing some of the most interesting questions:
- Which system call completes successfully even though its exit code is nonzero?
Answer: the fork() system call in Unix-like operating systems such as Linux creates a new (child) process by duplicating the current (parent) process. A successful call to this system call has a unique property that sets it apart from most other system calls: it returns different values in the parent and child processes. In the parent process, fork() returns the PID (process identifier) of the new child process, which is a positive number. This allows the parent to identify and manage its child processes.
- What happens at the system level when you run
ls -lin the terminal?
Answer: in short: Launching the shell interpreter - Parsing the command - Locating the executable file - Starting a new process - Replacing the process image - Executing the command - Outputting the results - Terminating the process.
- What is the maximum number of processes that can be in the
Runningstate?
Answer: the maximum number of processes in the RUNNING (R) state on a Linux system is determined by the system architecture and the kernel configuration. At any given moment, only one process per CPU core can actually be running. All other processes are in the S/D state and wait their turn to execute.
- What technologies underpin containerization?
Answer: two key technologies underpin the container approach in Linux: Namespaces and Control Groups. Namespaces are used to isolate a container's working processes from one another and from the host system. The control groups technology provides the limitation and isolation of resource usage (such as CPU, memory, disk space, network, etc.) by each container.
And now on to Kubernetes:
- What is a
headless service?
Answer: A Headless Service is a special type of service in Kubernetes that has no IP address of its own to be reached at. Instead, it delegates control directly to the pods. It's most useful for applications where information can be available on all nodes at once, with the load distributed across all of them.
- What is the optimal number of nodes to run in an ETCD cluster?
Answer: a three-node configuration is commonly used, which lets the cluster tolerate one node being in a failed state while still providing a good level of fault tolerance. For very high availability requirements, you might consider five nodes, which allows two nodes to fail without disrupting the cluster's operation. To increase request-processing speed, there's no point in running more etcd nodes.
✅ The rest of the popular questions with detailed answers can be found in my Devops Roadmap.