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

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. Prerequisites : System requirements: RAM 4GB CPU 1vCPU works, better performance 4 cores Ensure you have the following prerequisites installed on your CentOS 8 server: Create a Vagrant CentOS/8 box for SonarQube installation: Vagrant.configure(2) do |config| config.vm.box = "centos/8" config.vm.boot_timeout=600 config.vm.define "sonarqube" do |sonarqube| sonarqube.vm.network "private_network", ip: "192.168.33.150" sonarqube.vm.hostname = "sonarqube.devopshunter.com" sonarqube.vm.provider "virtualbox" do |vb| vb.cpus = "4" vb.memory = "4096" end end end Bring up the box using `vagrant up`. In the PuTTY / SSH terminal ...

Bitbucket Server installation on Linux

Image
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. Prerequisites for Bitbucket installation JRE/JDK: To run the web UI Java is required, Your system must have the JRE/JDK, we can go with the Open JDK as you know that Oracle JDK is now not open to everyone to download! Git: To run the Bitbucket we need Git as a source-code management tool. Ensure the default port 7990 is available on the system. If you are running on the Cloud ensure the TCP port /7990 allows inbound traffic. On the AWS you need to update the Security Group that associated with the EC2 instance. Option of Vagrant box  Vagrant.configure(2) do |config| config.vm.box = "centos/8" c...

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

 We as DevOps and DevSecOps Engineers working on many microservice based application architectures where we need to manage Kubernetes Cluster  Troubleshot at various levels. You cannot rely on single point of look for failures. While working on Kubernetes Troubleshooting we can make ourselves easy to understand the problem, if we could classify the problem belong to the following categories. Application Failure Master node/ControlPlane Failures Worker node Failures Application Failure - trobleshooting Here I'm listing out these with my understanding and experiance in practice tests provided by Munshad Mohammad on KodeKloud. You should know the architecture how it is deployed what all its dependents, where they have deployed with what endpoints, what names used. Check the service 'name' defined and referring service should match and also check the services 'Endpoints' are correctly defined and in referenceing used correctly. k -n dev-ns get all Better to check that t...