Posts

Job & CronJob - Batch Job

Image
What is Job object in Kubernetes? A Job object will be used to create one or more Pods and the Job ensures that a specified number of Pod instances will be created and terminates after completion of the Job. There could be finite jobs which will run within given certain timeout values. Job tracks for 'Successful' completion of the required task. Jobs can be run in two variants they can be parallel and also non-parallel. Kubernetes Job types There are 3 types of jobs non-parallel jobs [single pod jobs - unless it fails. creates replacement pod when pod goes down] parallel jobs with a fixed completion count parallel jobs with task queue  ##Example type 1: hundred-fibonaccis.yml --- apiVersion: batch/v1 kind: Job metadata: name: fibo-100 spec: template: spec: containers: - name: fib-container image: truek8s/hundred-fibonaccis:1.0 restartPolicy: OnFailure backoffLimit: 3 Create the Job: kubectl create -f hundred-fibonaccis.yml Now let's...

Kubernetes Deployment

Image
Hello DevSecOps, SRE or Platform Engineer or DevOps Engineers, In this post I want to discuss, Understanding of Kubernetes deployment it's hierarchy of kube objects. Declaratives and imperative ways to make deployment on kube clusters.  How to deploy an application on  Kubernetes pods, just follow these steps as shown in this post.  Here is new learning, I would like to share with you about Kubernetes deployment hierarchy , which internally calls the replication controller to make desired number of replicas of pod temple specified. Kubernetes Deployment hierarchy Let's go to have a deep understanding about Kubernetes deployment hierarchy. 1. Generating Kubernetes Deployment Manifest file We need to create a YAML file to define the deployment of the 'httpd' Apache Webserver. Here we are going to use the '--dry-run' option with client as value and '-o yaml' to generate the YAML file, to redirect the output we can use the g...

Control group [cgroup] limit the system resources

Image
Hello DevOps team, in this post I will be exploring the CGroup usage in docker engine. How check CGroup in the Linux file system supporting? To check all types of cgroups that are allowed in Linux system we can check at /sys/fs/cgroup directory What's the default memory limit for docker containers? Interestingly, when you don't define any control group on the memory limits, the docker engine will allocate the full memory of the VM as the maximum memory limit. How do we impose the container memory limits? When you run the container with the 100m upper memory limit for the tomcat image. You can see the limit value docker stats command. Can we control of CPU load per container? How? Yes it is possible to control the CPUs usage to container. Control group helps us in define the limit, this can be decimal values that indicate CPU cycles - example here with 0.1 We can apply both the control group limits on the same container. H...

SonarQube installation on Redhat Linux

Image
Are you still finding code quality issues only after deployment? Modern DevOps and DevSecOps teams shift quality and security checks earlier in the software delivery lifecycle. SonarQube helps teams identify bugs, code smells, security vulnerabilities, and technical debt before applications reach production. In this tutorial, we will install SonarQube 10 on Rocky Linux 8/CentOS 8 using PostgreSQL and Java 17, and prepare it for integration with modern CI/CD pipelines such as Jenkins, GitLab CI, GitHub Actions, and Azure DevOps. SonarQube installation on Vagrant box Linux As of my last update in August 2023, SonarQube 10 already released. However, I can provide you with general steps to install SonarQube on CentOS/Rocky 8. Please note that the steps might need adjustments based on the specific versions you are using. What we'll learn in this post? By the end of this article, you will be able to: Install SonarQube 10 on Rocky Linux 8 or CentOS 8 Configure PostgreSQL as the bac...

How to Install Atlassian Bitbucket Server on CentOS 8 / Rocky Linux 8 – Complete Git Repository Management Guide

Image
Looking for a secure, self-hosted Git platform for your development team? While GitHub and GitLab are popular choices, many enterprises prefer Atlassian Bitbucket because of its tight integration with Jira, fine-grained access controls, pull-request workflows, and enterprise collaboration features. In this tutorial, we will install Bitbucket Server on CentOS 8 using a Vagrant lab environment and learn how to create projects, repositories, and push code from a local Git client. Bitbucket is most widely used in the IT industry to provide team collaborative work for short size of teams. Its greater ability is to have integration with Jira and other DevOps tools. Bitbucket encourages private repository creation by default. So they are mostly not available for search engines to discover these projects! So, startup projects will do better here. What We'll Learn By the end of this article, you will be able to: Understand Bitbucket Server architecture Install Git and Java prerequis...

Manage Jenkins

Image
How do I use "Manage Jenkins" page?  Here I'm with all of the screenshots of each section of the Manage Jenkins page. this might contain "Monitors" that alert you when a new version of the Jenkins software or a security update is available. Each monitor includes links to the changelog that describes the new update as well as instructions to download and install the update. The Manage Jenkins page displays a series of tiles for common task areas, arranged in logical groupings:  System Configuration  — This section is designed for general system configuration, managing nodes and clouds, global tool configuration, and plugin management. Security  —  This section is designed to configure global security (authentication, authorization, and global settings that protect your Jenkins instance from intrusions) and screens to manage the credentials that provide secure access third-party sites and applications that interact with Jenkins. Status Information  —  This se...

Kubernetes Troubleshooting Guide for DevOps Engineers

Image
Hello DevOps, Platform Engineers, SREs, and Kubernetes Administrators! Modern applications are increasingly built using microservices and deployed on Kubernetes clusters. While Kubernetes provides scalability, resiliency, and automation, troubleshooting failures can sometimes become challenging because issues may originate from multiple layers of the platform. One of the biggest mistakes engineers make during troubleshooting is focusing on a single component without understanding the overall architecture. Effective Kubernetes troubleshooting requires a structured approach that helps quickly identify where the problem exists. Over time, while working on Kubernetes administration, troubleshooting production incidents, and practicing Kubernetes scenarios from KodeKloud labs by Munshi Mohammad, I found it useful to classify Kubernetes issues into three major categories: Application Failures Control Plane (Master Node) Failures Worker Node Failures By identifying the category first, trouble...