KodeKloud 100 Days of DevOps: Challenge Solutions

Learn DevOps by 100 days of hands-on challenges, each solved step by step with commands and screenshots

Contact Me
Challenge 01

Linux User Setup

Set up a Linux user with a non-interactive shell for automated tasks.
Linux
1h
Completed
Challenge 02

Temporary User Setup

Create a temporary user account with an automatic expiry date.
Linux
1h
Completed
Challenge 03

Secure Root SSH

Disable direct root SSH login and configure servers to enforce administrative login accountability.
Linux
3h
Completed
Challenge 04

Script Permissions

Modify file permissions for a distributed script to grant read and execute access.
Linux
1h
Completed
Challenge 05

SELinux Configuration

Install essential SELinux packages and permanently disable SELinux at system boot.
Linux
1h
Completed
Challenge 06

Create a Cron Job

Install cronie package, enable crond, and configure a recurring root task.
Linux
1h
Completed
Challenge 07

Linux SSH Auth

Generate RSA key pairs and distribute them to enable password-less SSH access.
Linux / SSH
1h
Completed
Challenge 08

Install Ansible

Install Ansible 4.10.0 globally using pip3 on the Jump Host.
Ansible / Python
1h
Completed
Challenge 09

MariaDB Troubleshooting

Troubleshoot database startup failure by resolving runtime directory permissions.
Database / Linux
1h
Completed
Challenge 10

Linux Bash Scripts

Write an automated backup Bash script that compresses static site data and transfers it remotely.
Bash / Linux
1h
Completed
Challenge 11

Install Tomcat Server

Install Apache Tomcat on App Server 1, change port to 8085, and deploy ROOT.war.
Java / Tomcat
1h
Completed
Challenge 12

Linux Network Services

Troubleshoot port conflicts, reconfigure sendmail SMTP port, and open firewall rules.
Network / Linux
1h
Completed
Challenge 13

IPtables Configuration

Install iptables-services and configure rules to restrict access only to the Load Balancer.
Security / Linux
1h
Completed
Challenge 14

Process Troubleshooting

Diagnose web server port conflicts, disable sendmail, and run httpd on port 5004.
Linux
1h
Completed
Challenge 15

Setup SSL for Nginx

Install Nginx, configure SSL block on port 443 with self-signed certificate, and deploy a secure page.
Nginx / SSL
1h
Completed
Challenge 16

Nginx as a Load Balancer

Install Nginx on the LB host, configure upstreams, and set up reverse proxy passing.
Nginx / LBR
1h
Completed
Challenge 17

Install PostgreSQL

Install PostgreSQL database engine and configure it for a development environment.
Linux
1h
Completed
Challenge 18

Install MariaDB

Install and configure MariaDB database engine for use in a development workspace.
Linux
1h
Completed
Challenge 19

Hosting Multiple Apache Sites

Install Apache on App Server 2, change the port to 5004, and set up VirtualHost configs.
Apache / Linux
1h
Completed
Challenge 20

Nginx + PHP-FPM Socket

Install Nginx and PHP-FPM 8.3 and configure high-performance communication over a Unix socket.
Nginx / PHP
1h
Completed
Challenge 21

Set Up Git Repository

Install Git and initialize a central bare repository at /opt/news.git on Nautilus Storage.
Git / Linux
1h
Completed
Challenge 22

Clone Git Repository

Clone an existing bare repository from /opt to /usr/src/kodekloudrepos as an unprivileged user.
Git / Linux
1h
Completed
Challenge 23

Fork a Git Repository

Sign in to Gitea, locate upstream repo sarah/story-blog, and fork it under your namespace.
Git / Gitea
1h
Completed
Challenge 24

Git Create Branches

Create a new feature branch xfusioncorp_media from the master branch on Nautilus Storage.
Git / Linux
1h
Completed
Challenge 25

Git Merge Branches

Create a feature branch, commit modifications, merge it back into master, and push to remote.
Git / Linux
1h
Completed
Challenge 26

Git Manage Remotes

Configure a new bare repository remote link on Nautilus Storage, commit, and push changes.
Git / Linux
1h
Completed
Challenge 27

Git Revert Changes

Perform a safe repository rollback by reverting the latest commit while preserving historical log.
Git / Linux
1h
Completed
Challenge 28

Git Cherry Pick

Cherry-pick a specific commit from a feature branch onto the master branch on Nautilus Storage.
Git / Linux
1h
Completed
Challenge 29

Manage Git Pull Requests

Raise a Pull Request on Gitea as Max, add Tom as reviewer, and merge changes without branch deletion.
Git / Gitea
1h
Completed
Challenge 30

Git Hard Reset

Revert a repository on Nautilus Storage to a previous commit using git reset --hard to discard unwanted test changes.
Git / Linux
1h
Completed
Challenge 31

Git Stash

Save dirty working copy changes temporarily using git stash, and restore a specific stash entry to clean the repository.
Git / Linux
1h
Completed
Challenge 32

Git Rebase

Rebase a feature branch onto the master branch on Nautilus Storage to maintain a clean, linear commit log history.
Git / Linux
1h
Completed
Challenge 33

Resolve Git Merge Conflicts

Resolve concurrent merge conflicts in story-index.txt manually as Max, correct spelling typos, and push to origin.
Git / Linux
1h
Completed
Challenge 34

Git Hook

Configure a server-side post-update Git hook inside a bare remote repository to automate release tagging on master pushes.
Git / Linux
1h
Completed
Challenge 35

Install Docker Packages and Start Docker Service

Configure the Docker repository, install docker-ce, docker-compose, and start the Docker system service.
Docker / Linux
1h
Completed
Challenge 36

Deploy Nginx Container on Application Server

Install and start Docker, deploy an Nginx Alpine container named nginx_3, and expose the application port.
Docker / Linux
1h
Completed
Challenge 37

Copy File to Docker Container

Securely transfer an encrypted file from the Docker host to a running container using docker cp.
Docker / Linux
1h
Completed
Challenge 38

Pull Docker Image

Pull a specific image tag (busybox:musl) from Docker Hub and retag it as busybox:media.
Docker / Linux
1h
Completed
Challenge 39

Create a Docker Image From Container

Create a new Docker image (beta:devops) from a running container (ubuntu_latest) using docker commit.
Docker / Linux
1h
Completed
Challenge 40

Docker EXEC Operations

Install apache2 inside a running container (kkloud) using docker exec and change the port configuration to 8085.
Docker / Linux
1h
Completed
Challenge 41

Write a Dockerfile

Create a custom Dockerfile to install apache2, change the listening port to 8087, and build the image.
Docker / Linux
1h
Completed
Challenge 42

Create a Docker Network

Configure a custom Docker bridge network (ecommerce) with a specific subnet and IP range.
Docker / Linux
1h
Completed
Challenge 43

Docker Ports Mapping

Deploy an Nginx container and map host port 8086 to container port 80 using docker run port publishing.
Docker / Linux
1h
Completed
Challenge 44

Write a Docker Compose File

Create a docker-compose.yml file to run an Apache web server with port mapping and volume host mounts.
Docker / Linux
1h
Completed
Challenge 45

Resolve Dockerfile Issues

Troubleshoot a broken Dockerfile by replacing RUN cp with COPY and moving files to the build context.
Docker / Linux
1h
Completed
Challenge 46

Deploy an App on Docker

Deploy a multi-container stack (PHP and MariaDB) using Docker Compose with volume storage and database credentials.
Docker / Linux
1h
Completed
Challenge 47

Docker Python App

Containerize a Flask Python application using a lightweight alpine image and configure port mappings.
Docker / Linux
1h
Completed
Challenge 48

Deploy Pods in Kubernetes

Create standalone Pods using kubectl run, and generate manifests with client-side dry runs.
Kubernetes
1h
Completed
Challenge 49

Deploy Apps with K8s Deployments

Create high-availability deployments with custom replica counts and test pod self-healing behavior.
Kubernetes
1h
Completed
Challenge 50

Set Resource Limits in K8s Pods

Configure memory and CPU requests/limits for Pods to enforce Guaranteed QoS parameters.
Kubernetes
1h
Completed
Challenge 51

Execute Rolling Updates in K8s

Perform zero-downtime rolling updates on Deployments and practice rollout history checks and rollbacks.
Kubernetes
1h
Completed
Challenge 52

Revert K8s Deployments

Troubleshoot failed rollouts and execute rollbacks to stable versions using rollout undo.
Kubernetes
1h
Completed
Challenge 53

Resolve Volume Mounts

Troubleshoot shared volume mount paths and align ConfigMap configurations in a multi-container Pod.
Kubernetes
1h
Completed
Challenge 54

Kubernetes Shared Volumes

Configure and deploy a multi-container Pod sharing storage via an emptyDir volume.
Kubernetes
1h
Completed
Challenge 55

Kubernetes Sidecar Containers

Implement the Sidecar pattern in a Pod using Nginx and an Ubuntu log-shipping sidecar container.
Kubernetes
1h
Completed
Challenge 56

Deploy Nginx Web Server on K8s

Deploy a replicated Nginx web server and expose it externally using a NodePort Service.
Kubernetes
1h
Completed
Challenge 57

Print Environment Variables

Inject static environment variables into a Pod container and output their concatenated values.
Kubernetes
1h
Completed
Challenge 58

Deploy Grafana on K8s

Deploy a Grafana container and expose its visualization dashboard externally using a NodePort Service.
Kubernetes
1h
Completed
Challenge 59

Troubleshoot K8s Deployments

Diagnose container state issues and correct volume and image name typos in a Deployment spec.
Kubernetes
1h
Completed
Challenge 60

Persistent Volumes in K8s

Configure static persistent storage using PersistentVolumes and Claims and bind them to a web server.
Kubernetes
1h
Completed
Challenge 61

Init Containers in K8s

Implement an init container to perform pre-requisite startup tasks and prepare shared volume files.
Kubernetes
1h
Completed
Challenge 62

Kubernetes Secrets

Store license information securely as generic Secrets and consume them inside a running Pod container.
Kubernetes
1h
Completed
Challenge 63

Deploy Multi-Tier App on K8s

Deploy a two-tier application (Iron Gallery & MariaDB) under a custom namespace with resource limits and services.
Kubernetes
1h
Completed
Challenge 64

Fix Python App on K8s

Troubleshoot port inconsistencies and correct container image names in a Deployment and Service spec.
Kubernetes
1h
Completed
Challenge 65

Deploy Redis on K8s

Configure a Redis Deployment with dedicated emptyDir data storage and mounted ConfigMap configurations.
Kubernetes
1h
Completed
Challenge 66

Deploy MySQL on K8s with PV & Secrets

Deploy a MySQL database using PV/PVC persistent storage, Secrets for credential management, and NodePort 30007.
Kubernetes
1h
Completed
Challenge 67

Deploy Guestbook Application on K8s

Deploy a multi-tier Guestbook application using Redis master-slave replication and a PHP frontend tier.
Kubernetes
1h
Completed
Challenge 68

Set Up Jenkins Server

Install Java runtime environment, configure the official Jenkins repository, and complete the Initial Setup Wizard.
Jenkins
1h
Completed
Challenge 69

Install Jenkins Plugins

Configure Jenkins update center, install Git and GitLab integration plugins, and complete verification on installed plugins tab.
Jenkins
1h
Completed
Challenge 70

Configure Jenkins User Access

Utilize the Project-based Matrix Authorization Strategy to assign overall read permission to a new user and restrict anonymous access.
Jenkins
1h
Completed
Challenge 71

Configure Jenkins Job for Package Installation

Automate remote package installation on storage servers using parameterized Jenkins Freestyle jobs and non-interactive SSH execution.
Jenkins
1h
Completed
Challenge 72

Configure Jenkins Parameterized Job

Configure a Jenkins Freestyle job with String and Choice parameters to pass dynamic execution environment variables into build scripts.
Jenkins
1h
Completed
Challenge 73

Schedule Jenkins Job to Copy Apache Logs Periodically

Configure a scheduled Jenkins job executing every 12 minutes to transfer Apache access and error logs from App Server 1 to the Storage Server over SSH.
Jenkins
1h
Completed
Challenge 74

Configure Jenkins Job for Database Backup

Automate periodic MySQL database dumps from App Server 1 and transfer dated backup files to the Storage Server using scheduled Jenkins shell jobs.
Jenkins
1h
Completed
Challenge 75

Add Jenkins SSH Build Agent Nodes

Configure distributed build architecture by attaching App Server 1, App Server 2, and App Server 3 as SSH agent nodes in Jenkins with Java 17 prerequisites.
Jenkins
1h
Completed
Challenge 76

Configure Job-Level Authorization Strategy in Jenkins

Implement granular Job-level Role-Based Access Control using Project-based Matrix Authorization Strategy to assign specific build, configure, update, and tag permissions to team users.
Jenkins
1h
Completed
Challenge 77

Jenkins Deploy Pipeline

Automate static website deployment from a Gitea repository to Apache web server root on App Server 1 using a Jenkins Declarative Pipeline script.
Jenkins
1h
Completed
Challenge 78

Jenkins Deploy Pipeline (Parameterized)

Automate multi-branch static website deployment from Gitea to Apache web server root on App Server 1 using a Jenkins Parameterized Declarative Pipeline.
Jenkins
1h
Completed
Challenge 79

Jenkins Deployment Job

Configure an automated deployment job in Jenkins with SCM polling to deploy code from Gitea master branch to Apache web server root on App Server 1.
Jenkins
1h
Completed
Challenge 80

Jenkins Chained Builds

Configure an automated multi-job build chain in Jenkins to deploy application updates and restart Apache web service upon successful upstream completion.
Jenkins
1h
Completed
Challenge 81

Jenkins Multistage Pipeline

Create a Declarative Jenkins Pipeline job with Deploy and Test stages to pull web application updates from Gitea and perform automated health check verification.
Jenkins
1h
Completed
Challenge 82

Create Ansible Inventory for App Server Testing

Configure an INI-formatted Ansible inventory file on the Jump Host with target host connection parameters and variables to manage application servers in Stratos DC.
Ansible
1h
Completed
Challenge 83

Troubleshoot and Create Ansible Playbook

Troubleshoot Ansible inventory connectivity and create a declarative YAML playbook to execute tasks and manage files across managed nodes in Stratos DC.
Ansible
1h
Completed
Challenge 84

Copy Data to App Servers Using Ansible

Automate static data file transfers from Ansible control node to multiple target application servers in Stratos DC using ansible.builtin.copy module.
Ansible
1h
Completed
Challenge 85

Create Files on App Servers Using Ansible

Create files and manage filesystem object states, mode permissions, and host-specific ownership across application servers using ansible.builtin.file module.
Ansible
1h
Completed
Challenge 86

Set Up Password-Less SSH for Ansible

Configure password-less SSH authentication from Jump Host controller to App Server 2 and verify connectivity using Ansible ping module with custom inventory.
Ansible
1h
Completed
Challenge 87

Install Chrony Package Using Ansible

Create Ansible inventory and playbook to automate chrony package installation across all Stratos DC app servers using ansible.builtin.yum module and privilege escalation.
Ansible
1h
Completed
Challenge 88

Deploy Httpd Web Server Using Ansible

Automate httpd web server installation, service management, and custom index page deployment with blockinfile module across all Stratos DC application servers.
Ansible
1h
Completed
Challenge 89

Ansible Manage Services

Install httpd package and manage service state to ensure it is started and enabled across all Stratos DC application servers using Ansible yum and service modules.
Ansible
1h
Completed
Challenge 90

Managing ACLs Using Ansible

Automate creating target files owned by root and managing granular extended Access Control Lists (ACLs) across app servers using ansible.posix.acl module.
Ansible
1h
Completed
Challenge 91

Ansible lineinfile Module

Automate httpd web server setup and prepending welcome header text at Beginning of File (BOF) on index.html using ansible.builtin.lineinfile module.
Ansible
1h
Completed
Challenge 92

Managing Jinja2 Templates Using Ansible

Create dynamic index.html.j2 template using inventory_hostname variable and deploy via Ansible template module within httpd role across app servers.
Ansible
1h
Completed
Challenge 93

Using Ansible Conditionals

Deploy host-specific files and manage target user ownership dynamically across Stratos DC app servers using Ansible when conditional expressions.
Ansible
1h
Completed
Challenge 94

Create VPC Using Terraform

Provision a Virtual Private Cloud (VPC) named devops-vpc in AWS us-east-1 region using HCL configuration, terraform init, plan, and apply workflows.
Terraform
1h
Completed
Challenge 95

Create Security Group Using Terraform

Provision an AWS Security Group named xfusion-sg with inbound rules for HTTP (port 80) and SSH (port 22) traffic using Terraform in us-east-1.
Terraform
1h
Completed
Challenge 96

Create EC2 Instance Using Terraform

Provision an Amazon Linux EC2 instance named devops-ec2 with an RSA 4096-bit key pair devops-kp and default security group attachment using Terraform.
Terraform
1h
Completed
Challenge 97

Create IAM Policy Using Terraform

Provision a customer-managed AWS IAM policy named iampolicy_kareem granting EC2 read-only permissions using jsonencode HCL configuration in Terraform.
Terraform
1h
Completed
Challenge 98

Create Private VPC, Subnet and EC2 Instance Using Terraform

Provision an isolated AWS private VPC datacenter-priv-vpc, subnet datacenter-priv-subnet, restricted security group, and t2.micro EC2 instance datacenter-priv-ec2 with input variables and outputs in Terraform.
Terraform
1h
Completed
Challenge 99

Create DynamoDB Table, IAM Role, and Read-Only Policy Using Terraform

Provision an AWS DynamoDB table xfusion-table, IAM role xfusion-role, and read-only IAM policy xfusion-readonly-policy using tfvars and outputs in Terraform.
Terraform
1h
Completed
Challenge 100

Create EC2 Instance and CloudWatch Alarm Using Terraform

Provision an Ubuntu EC2 instance xfusion-ec2, query existing SNS topic xfusion-sns-topic, and configure a CloudWatch CPU utilization alarm xfusion-alarm in Terraform.
Terraform
1h
Completed