Batch job to save metrics data to be used by RCA methods.
The job consists of following steps:
- Query Prometheus API for metrics such as CPU usage, memory usage, and network latency.
- Format queried metrics into Pandas Dataframe.
- Save the Dataframe to S3 bucket or localfile.
Prerequisite:
- K8s cluster access via kube config.
- AWS credentials in
~/.aws/
(for S3). - Prometheus API access (defaults at
http://localhost:9090
).
Prepare env file:
cp .env.example .env
vi .env # fill the environmental variables as needed.
Run:
make install
make start
Prerequisite:
- K8s cluster access via kube config.
- AWS credentials in
~/.aws/
(for S3). - Sealed Secrets controller installed in cluster and cli installed locally.
Prepare env file:
cp .env.example k8s/overlays/development/.env.k8s
vi k8s/overlays/development/.env.k8s # fill the environmental variables as needed.
Build Image if needed:
make ship
Deploy:
make deploy NAMESPACE=[namespace to deploy to]