-
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 metadata: name: prometheus-server provisioner: kubernetes.io/aws-ebs parameters: type: gp2 fsType: ext4 allowVolumeExpansion: true
Persistent Volume Claim - AlertManager
apiVersion: v1 kind: PersistentVolumeClaim metadata: name: prometheus-alertmanager namespace: prometheus labels: app: prometheus-alertmanager spec: storageClassName: prometheus-alertmanager resources: requests: storage: 50Gi accessModes: - ReadWriteOnce
Persistent Volume Claim - Server
apiVersion: v1 kind: PersistentVolumeClaim metadata: name: prometheus-server namespace: prometheus labels: app: prometheus-server spec: storageClassName: prometheus-server resources: requests: storage: 50Gi accessModes: - ReadWriteOnce
-
Install using Helm
In this command we've set few values like
namespace, service type, storageclass, PVC and its size as created in previous type
helm install prometheus stable/prometheus \ --namespace prometheus \ --set alertmanager.persistentVolume.storageClass="prometheus-alertmanager",server.persistentVolume.storageClass="prometheus-server",alertmanager.persistentVolume.existingClaim="prometheus-alertmanager", server.persistentVolume.existingClaim="prometheus-server",server.service.type="LoadBalancer"
-
Verify the installation
helm list -n prometheus kubectl get sc -n prometheus kubectl get po -n prometheus kubectl get svc -n prometheus
When we want to use maven command line to upload zip type artifact to artifact repository then we don't want resources, compiler, surefire, install phases in maven process, only assembly would be enough. To skip particular phases go to each plugin's original website phase according to latest running plugin version download the same to our own project refer the skip phase configuration of particular phase, either it can be done command line or as part of the build-plugin-configuration. Example using POM.xml file <project> [...] <build> <plugins> <plugin> <groupId...
Comments
Post a Comment