Posts

Showing posts from June, 2021

L4 Load Balancing on Kubernetes with Rancher

Image
  Login to Rancher and   Choose project from top menu in selected Cluster wherever you want to deploy the service (In my case in default project want to deploy the service) Click on Deploy Button 1.   Fill up the field details are as below Name of workload: any Scalable deployment of: no of pod want to deploy Dockers Image : Docker Image path (from private or public Registry Server) Namespace:  Default (Choose Accordingly) Choose L4 load balancer as a service from Drop down Publish the container port: Where the service will run under container On listening port: Host port which will be available As  s hown in below image Fill above form accordingly Now Click on launch button Workloads has been created and now running on 80 port. Click on created workload default page of nginx will open.As shown in below image Click on 80/tcp link

L7 Load Balancing (CLUSTER IP)on Kubernetes with Rancher

Image
  Login to Rancher and  Choose project from top menu in selected Cluster wherever you want to deploy the service (In my case in default project want to deploy the service) 2.   Fill up the field details are as below Name of workload: any Scalable deployment of: no of pod want to deploy Dockers Image : Docker Image path (From private or public registry server) Namespace:  Default (Choose Accordingly) Choose CLUSTER IP as a service from Drop down (L7 Load Balancer) Publish the container port: Where the service will run under container On listening port: Host port which will be available As given below image: 3. So GOTO Load Balancer from top menu and create Ingress service named medium As shown in below image 4.  Fill  u p the field details are as below Namespace : Default (Choose Accordingly) RULES: if select first option then Rancher will generate any random host name otherwise choose specify hostname to use and give any host name Path: where is the...

How to remove/add OSD from Ceph cluster

  Remove OSD from Ceph Cluster Firstly check which OSD is down and want to remove from Ceph Cluster by using given command:  ceph osd tree .  Let’s say it is osd.20 which is down and want to remove. Now use the following commands a.  ceph osd out osd.20 ( If you see “ osd.20 is already out ” — it’s ok. ) b.  ceph osd down osd.20 c. Remove it:  ceph osd rm osd.20 If it says   ‘ Error EBUSY: osd.11 is still up; must be down before removal. ’ that means OSD is not dead yet. Go to the host it resides on and kill it ( systemctl stop ceph-osd@20 ), and repeat rm operation. d.  ceph osd crush rm osd.20 e. remove it authorization (it should prevent problems with ‘couldn’t add new osd with same number’):  ceph auth del osd.20 . f. Make sure it is safe to destroy the OSD: ceph osd destroy 20 --yes-i-really-mean-it g. Now check with the following command:  ceph -s  or  ceph -w h. If want to remove ceph LVM volume created on host m...

CI/CD Deployment pipeline using Jenkins on Kubernetes to deploy a Simple Nginx application

Image
  Requirements: For CI/CD deployment pipeline using Jenkins on Kubernetes you need git repository and Kubernetes setup as well as Jenkins plugins named docker , docker pipeline( plugin integrates Jenkins with docker)and Kubernetes continuous deployment Create credentials in Jenkins for Kubernetes (Given ID will use in Jenkinsfile). Click to Credentials on the left menu and fill the fields as shown in below image 3. Create a new item and select pipeline option as shown in below image Create a new item with pipeline option 4(a). Now add credentials with the key file in two steps to use encrypted git credentials in Jenkinsfile Create a secret text to implement the git 4(b). now got to the project -> click on pipeline syntax link now right-side drop-down choose: with credentials: Bind credentials to variables and then choose a secret box from next drop down box and choose above credential ID and enter any value which will use in Jenkinsfile. It will generate the line of code...

GitLab CI/CD implementation on Kubernetes Cluster (L4 And L7 Load Balancer)

Image
  Login to Gitlab and create a project Create project in Gitlab 2. Add Kubernetes cluster in created project Select Kubernetes option under operations 3. Add existing cluster and fill up all the fields which is related to kube-config file. Fill Kubernetes cluster info 4. Disable the Auto Dev-Ops for project. Go to settings->CI/CD->Expand Auto Dev-Ops and uncheck the Default to Auto DevOps Pipeline. Disable auto DevOps 5. Create or Enable Runner for this project (Settings->CI/CD->Expand Runner) . Set up a specific Runner manually or Enable the shared runner (Created earlier by using  link https://docs.gitlab.com/runner/install/linux-manually.html ) Enable Runner 6. Now Deploy the project with Docker file, gitlab ci/cd file and kubernetes template file. Gitlab CI/CD file named .gitlab-ci.yml and format is as below #before_script: # - sudo usermod -aG docker $USER build: script: - docker build -t dokcer.io/library/nginx:$CI_COMMIT_SHA . - docker log...

How to Create Bootable CentOS 7 USB Stick (to Command Line) on Linux

Image
  Downloading CentOS ISO file Download the CentOS ISO file from the  CentOS downloads  page where you can choose between “DVD ISO” and “Minimal ISO”. Creating Bootable CentOS 7 USB Stick on Linux Insert the USB flash drive into the USB port. Find out the name of your USB drive with the  lsblk  command:  $ lsblk The output will look like this: Output Sample of lsblk command In our case the name of the USB device is  /dev/sdx  but this may vary on your system. 3. On most Linux distributions the USB flash drive will be automatically mounted when inserted. Before flashing the image make sure the USB device is not mounted. To do so use the umount command followed by either the directory where it has been mounted (mount point) or the device name: unmount the device 4. The   last step is to flash the CentOS ISO image to the USB drive. Make sure you replace  /dev/sdx  with your drive and do not append the partition number. Also, rep...