GCP/Kubecost Data Audit
Performing a cluster data audit
First, in the Kubecost UI, view the price of a single node for a single day. This can be done on the Assets page by modifying your query with the following requests:
Select the window range picker and select Today
Select Filter and add the filters Provider is "GCP" and Asset Type is "node".
![](https://docs.kubecost.com/~gitbook/image?url=https%3A%2F%2F1804196253-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FiPW99yDnU7U1FFgLgPOZ%252Fuploads%252Fgit-blob-af095d48b258a5d1e780994a6717af67b83f0571%252Fgcp-kubecost-gke-asset.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=75e266cc&sv=1)
Next, compare this instance's costs with what is found in the GCP export via BigQuery. Use the providerID that's in Kubecost for the node as the resource.name
in the following query:
![](https://docs.kubecost.com/~gitbook/image?url=https%3A%2F%2F1804196253-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FiPW99yDnU7U1FFgLgPOZ%252Fuploads%252Fgit-blob-86cec5a290f53040a66ea1162c24735e09812ac4%252Fdataaudit-gcp-bigquery-output.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=d1f06ebc&sv=1)
The example above is auditing the GKE nodes associated with the cluster. BigQuery will return additional items such as network costs and costs associated with the node pool, however you should focus on GKE nodes only.
Performing an Audit against GCP resources (services)
Navigate to the Cloud Cost Explorer page. choose a window with a start date (Select Start) and end date (Select End) only 24 hours apart from each other, where the end date is greater than 48 hours in the past. Then, select Filter and add the filters Provider is "GCP" and Account ID is "".
![](https://docs.kubecost.com/~gitbook/image?url=https%3A%2F%2F1804196253-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FiPW99yDnU7U1FFgLgPOZ%252Fuploads%252Fgit-blob-8334b38cb47d72c5221aa0dce8115d6c7e0d0207%252Fkubecost-gcp-services.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=d1a4eb5f&sv=1)
Next, compare the costs of services for the same account in the GCP billing console.
Total costs aren't always precise and may have a deviation of 1-2%.
![](https://docs.kubecost.com/~gitbook/image?url=https%3A%2F%2F1804196253-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FiPW99yDnU7U1FFgLgPOZ%252Fuploads%252Fgit-blob-b354aa71068610bbcfa86d19080885f7d4894018%252Fdataaudit-gcp-console.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=d40539e4&sv=1)
Last updated