UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit ea29010a authored by Ryan Garcia's avatar Ryan Garcia :dizzy:
Browse files

Merge branch...

Merge branch '1514-document-installing-and-using-vpa-in-bigbang-and-vertically-scaling-log-forwarder-pods' into 'master'

Resolve "Document Installing and Using VPA in BigBang and Vertically Scaling Log Forwarder Pods"

Closes #1514

See merge request !2805
parents 4058311d 4e6d2655
No related branches found
No related tags found
1 merge request!2805Resolve "Document Installing and Using VPA in BigBang and Vertically Scaling Log Forwarder Pods"
# Installing and Configuring VPA for Vertical Scaling of Fluent Bit and Promtail Pods
Since log forwarder pods like fluentbit & promtail are designed to have 1 pod per node via a ReplicaSet instantiation they are unable to be Horizontally Scaled when reaching their resource limits. They can still be Vertically scaled once [VPA](https://repo1.dso.mil/big-bang/apps/sandbox/vpa) is installed.
# 1.Prerequisites:
- Kubernetes cluster running version 1.14 or later
- kubectl command-line tool configured to access the cluster
# 2.Install the Vertical Pod Autoscaler
1. Run the following commands to install the VPA components from the package repo:
git clone https://repo1.dso.mil/big-bang/apps/sandbox/vpa.git
cd vpa
helm install vertical-pod-autoscaler chart/
2. Add package via the BigBang 2.0 `packages:` key:
packages:
vpa:
enabled: true
git:
repo: "https://repo1.dso.mil/big-bang/apps/sandbox/vpa.git"
tag: LATEST_TAG
path: chart
...
# 3.Configure Fluent Bit Deployment
For Fluentbit, make sure the following settings are added to the packages Helm Chart [values.yaml](https://repo1.dso.mil/big-bang/product/packages/fluentbit/-/blob/main/chart/values.yaml_) file:
```yaml
autoscaling:
vpa:
enabled: true
annotations: {}
# List of resources that the vertical pod autoscaler can control. Defaults to cpu and memory
controlledResources: []
# Define the max allowed resources for the pod
maxAllowed:
cpu: 200m
memory: 100Mi
# Define the min allowed resources for the pod
minAllowed:
cpu: 200m
memory: 100Mi
```
# 4.Configure Promtail Deployment
For Promtail, make sure the following settings are added to the Packages Helm Chart [values.yaml](https://repo1.dso.mil/big-bang/product/packages/promtail/-/blob/main/chart/values.yaml) file:
```yaml
# -- config for VerticalPodAutoscaler
vpa:
enabled: true
# kind -- DaemonSet or Deployment
kind: DaemonSet
annotations: {}
# List of resources that the vertical pod autoscaler can control. Defaults to cpu and memory
controlledResources: []
# Define the max allowed resources for the pod
maxAllowed:
cpu: 200m
memory: 100Mi
# Define the min allowed resources for the pod
minAllowed:
cpu: 200m
memory: 100Mi
updatePolicy:
# Specifies whether recommended updates are applied when a Pod is started and whether recommended updates
# are applied during the life of a Pod. Possible values are "Off", "Initial", "Recreate", and "Auto".
updateMode: Auto
```
# 5.Verify VPA Status
Check the VPA status to ensure it is functioning correctly and providing recommendations.
Run the following command:
```shell
kubectl describe vpa -A
```
Look for the Conditions section and verify that the status is Healthy.
# 6.Monitor and Observe Scaling
Monitor the cluster and observe how the VPA scales the Fluent Bit and Promtail pods based on resource utilization.
Review the pod resource utilization metrics using commands like kubectl top pods or monitoring tools like Prometheus and Grafana.
By following these steps, you should be able to install and configure the Vertical Pod Autoscaler (VPA) to vertically scale Fluent Bit and Promtail pods in your Kubernetes cluster when additional resources are needed and headroom is available. Adjust the configurations and policies based on your specific requirements and application characteristics.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment