iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🔖

How to Stop Ongoing Network Service Charges After Deleting a GKE Cluster

に公開

After finishing playing around with GKE by referring to resources such as Deploying an app to a GKE cluster, I noticed that minor billing from GCP continued even after I had deleted the GKE cluster.

Most likely, my method of deleting the GKE cluster was incorrect, but I was able to stop the charges, so I am recording this as a reminder.

Prerequisites

  • Cases where billing for network services does not stop even after creating and deleting all GKE clusters.
  • You have no recollection of using network services.

Checking the Billing Source

When I checked the billed services from the "Billing Details," I confirmed that charges were occurring under Network -> Networking Service Directory Registered Resource.

Checking the Billing Source

Next, when I checked Network -> Service Directory, I found that a namespace named "goog-psc-default" had been created.
Since there were no other Service Directory namespaces in the project where billing was occurring, I realized that charges were being generated by this namespace.

According to documentation such as Accessing published services through endpoints, the "goog-psc-default" namespace seems to be the one used when an endpoint is created on GCP if no namespace is selected, so it appears to be created automatically if it does not exist.
(It might have been created at the timing when a load balancer was created in GKE, for example.)

Deleting the Service Directory Namespace

I immediately tried to delete "goog-psc-default" from the Google Cloud Console UI, but it seemed an error occurred and it could not be deleted.
By running the gcloud command as shown below, I was able to delete the Service Directory namespace "goog-psc-default" and stop the billing.

# location is the Region where the namespace was created
$ gcloud service-directory namespaces delete goog-psc-default --location=us-west1

As of March 2023, the amount is about 14 yen per month, but if you want to stop billing occurring due to the same situation, I hope you will give this a try.

GitHubで編集を提案

Discussion