Skip to main content

Posts

Install Grafana on AWS EKS using Helm

Create namespace for Grafana kubectl create ns grafana We'll store Grafana data on AWS EBS as persistent storage, hence for that create storage class apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: grafana provisioner: kubernetes.io/aws-ebs parameters: type: gp2 fsType: ext4 allowVolumeExpansion: true Install using Helm - In this command we've set few values like namespace, service type, storageclass and its size helm install grafana stable/grafana --namespace grafana --set service.type=LoadBalancer,persistence.enabled=true,persistence.type=pvc,persistence.size=100Gi,persistence.st...

Install InfluxDB on AWS EKS using Helm

Create namespace for influxdb kubectl create ns influxdb We'll store InfluxDB data on AWS EBS as persistent storage, hence for that create storage class apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: influxdb provisioner: kubernetes.io/aws-ebs parameters: type: gp2 fsType: ext4 allowVolumeExpansion: true Install using Helm - In this command we've set few values like namespace, service type, storageclass and its size helm install influxdb stable/influxdb --namespace influxdb --set service.type=LoadBalancer,persistence.enabled=true,persistence.storageClass=influxdb,persistence.size=...

Send Jenkins Parameters to Spinnaker

Prerequisite Jenkins Installation - Refer my blog for Jenkins installation on AWS EKS using Helm Spinnaker Installation - Refer their official website for installation document https://www.spinnaker.io/setup/ Jenkins-Spinnaker Integration - Refer my blog for integration setup between Jenkins and Spinnaker Use-case example Using Spinnaker we're deploying application to kubernetes cluster. For this, we've written kubernetes manifests file in spinnaker pipeline stages with namespace and version of the application as variables. These values we might want from Jenkins for, namespace will be replaced by branch name of jenkins running the build and version will be replaced by version populated while running the build. Example of such kubernetes manifest file apiVersion: apps/v1beta1 kind: Deployment metadata: name: petclinic n...

Jenkins-Spinnaker Integrations

How to trigger spinnaker CD pipeline from Jenkins CI pipeline For this setup all configurations we would do using spinnaker halyard CLI Enable Jenkins Master hal config ci jenkins enable Add Jenkins Master with any required name to Jenkins master list. Here I've used name "my-jenkins-master" While running this command keep jenkins admin user token handy which is required to authentication echo $APIKEY | hal config ci jenkins master add my-jenkins-master \ --address $BASEURL \ --username $USERNAME \ --password # api key will be read from STDIN to avoid appearing # in your .bash_history To app...

Show Jenkins Build Metrics on Grafana Using InfluxDB

Install InfluxDB - Here's the link for how to install influxdb on AWS EKS - https://devopsautomationblogs.blogspot.com/2020/04/install-influxdb-on-aws-eks-using-helm.html Configure InfluxDB for jenkins build metrics collection Go inside the influxdb pod and Run below 2 commands kubectl exec -it -n influxdb influxdbPodName /bin/bash influx # open influx database CREATE DATABASE jenkins_db # create jenkins database CREATE USER jenkins WITH PASSWORD 'admin' WITH ALL PRIVILEGES # create jenkins username Install Grafana - Here's the link for how to install influxdb on AWS EKS - https://devopsautomati...

Install Prometheus on AWS EKS using Helm

Create Namespace for Prometheus kubectl create ns prometheus Persistent Storage We'll store Prometheus data on AWS EBS as persistent storage, for that create we'll create storage class and persitent volument claim. We need to create 2 SC and PVC for 2 different component of Prometheus - Server and AlertManager. StorageClass - AlertManager apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: prometheus-alertmanager provisioner: kubernetes.io/aws-ebs parameters: type: gp2 fsType: ext4 allowVolumeExpansion: true StorageClass - Server apiVersion: storage.k8s.io/v1 kind: StorageClass metad...

How to create Service type LoadBalancer with private ip address from assigned vnet-subnet

Use-case - To expose the service within virtual network as Internal LoadBalancer By default, when we create service type LoadBalancer without customized annotations in AKS(Azure Kubernetes Service), then AKS will create Load Balancer with Public IP attached to it, through which application can be accessible to internet world. However, it is possible that we may need to create service to be exposed within virtual network only, however with service type Load Balancer. For this, we need to add service.beta.kubernetes.io/azure-load-balancer-internal: "true" in annotations in kubernetes service manifest file. Create an Internal LoadBalancer apiVersion: v1 kind: Service metadata: name: nameOfService annotations: service.beta.kubernetes.io/azure-load-balancer-internal: "true" spec: type: LoadBalancer ports: - port: 8080 targe...