These PxL scripts demonstrate how to use telemetry data automatically provided by Pixie to estimate the cost of your Kubernetes cluster.
-
cpu_cost.pxl: Estimates yearly CPU cost per Service based on last hour of usage.
-
mem_cost.pxl: Estimates yearly memory cost per Service based on last hour of usage.
-
network_cost.pxl: Estimates yearly network cost per Service based on last hour of usage.
-
cost_per_request.pxl: Estimates yearly number of requests per Service based on last hour of usage.
-
Install Pixie on your Kubernetes cluster. If you do not have a cluster, you can create a minikube cluster and install Pixie using one of our install guides.
-
Adjust the placeholder cost values at the top each script depending on your specific cloud provider's pricing model.
-
Run the scripts using Pixie's Live CLI or UI.
Using the Live CLI:
- Copy the scripts to a local directory.
- Run
px run -f <script.pxl>- Switch between the output tables by using the number keys (or a mouse click) to select the table tabs listed at the bottom left of the terminal.
- Sort table columns by clicking the column title.
Using the Live UI:
- Select the
Scratch Padscript from the script drop-down menu.- Open the editor using
ctrl+e(Windows, Linux) orcmd+e(Mac).- Paste the contents of the script into the editor and close the editor using
ctrl+e(Windows, Linux) orcmd+e(Mac).- Press the
RUNbutton (top right) to execute the script.- Sort table columns by clicking the column title.
Please reach out on our Pixie Community Slack or file a GitHub issue.
