### Install OpenCost Helm Chart Source: https://github.com/opencost/opencost-helm-chart/blob/main/charts/opencost/README.md Use this command to install the OpenCost Helm chart with a specified release name. Ensure Helm is installed and configured. ```console helm install opencost opencost/opencost ``` -------------------------------- ### Helm Unittest Output Example Source: https://github.com/opencost/opencost-helm-chart/blob/main/README.md Example output from running `helm unittest`. This shows the results of test suites and individual tests. ```text ### Chart [ opencost ] charts/opencost PASS test deployment charts/opencost/tests/deployment_test.yaml PASS test deployment snapshot charts/opencost/tests/opencost_test.yaml Charts: 1 passed, 1 total Test Suites: 2 passed, 2 total Tests: 2 passed, 2 total Snapshot: 1 passed, 1 total Time: 31.011089ms ``` -------------------------------- ### Run Helm Unittest Source: https://github.com/opencost/opencost-helm-chart/blob/main/README.md Execute unit tests for the OpenCost Helm chart. This command requires the helm-unittest plugin to be installed. ```console helm unittest charts/opencost ``` -------------------------------- ### Add OpenCost Helm Repository Source: https://github.com/opencost/opencost-helm-chart/blob/main/README.md Add the OpenCost Helm repository to your local Helm configuration. This command is used to make the OpenCost chart available for installation. ```console helm repo add opencost https://opencost.github.io/opencost-helm-chart ``` -------------------------------- ### Port-Forward Directly to OpenCost Pod Source: https://github.com/opencost/opencost-helm-chart/blob/main/charts/opencost/templates/NOTES.txt Establishes a port-forward connection directly to an OpenCost pod for UI access. This method requires identifying a running pod. ```bash export POD_NAME=$(kubectl get pod -l app.kubernetes.io/instance={{ .Release.Name }} -n {{ .Release.Namespace }} -o jsonpath="{.items[0].metadata.name}") kubectl -n {{ .Release.Namespace }} port-forward $POD_NAME 9090 ``` -------------------------------- ### Port-Forward to OpenCost Service Source: https://github.com/opencost/opencost-helm-chart/blob/main/charts/opencost/templates/NOTES.txt Establishes a port-forward connection to the OpenCost service for UI access when the service is cluster-internal. ```bash export SVC_NAME={{ include "opencost.fullname" . }} kubectl port-forward svc/$SVC_NAME 9090 -n {{ .Release.Namespace }} ``` -------------------------------- ### Check OpenCost Pod Status Source: https://github.com/opencost/opencost-helm-chart/blob/main/charts/opencost/templates/NOTES.txt Verifies that the OpenCost pods are running within the specified namespace. ```bash kubectl get pods -l app.kubernetes.io/instance={{ .Release.Name }} -n {{ .Release.Namespace }} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.