Hot answers tagged

7 votes
Accepted

How to know which user created the GCE Instance

Note: I'm not a GCE user yet, the answer is based solely on documentation. You could be Viewing Audit Logs in the Google Cloud Console, more specifically the Admin Activity logs: Admin Activity ...
user avatar
5 votes
Accepted

How should GCP projects be organized?

Speaking primarily from the Google App Engine (GAE) perspective. My preference is for environment-driven project split. This might be of interest: Advantages of implementing CI/CD environments at GAE ...
user avatar
4 votes

Can we do zero-downtime kubernetes deployment with a single pod?

Is there anyway to configure K8s to actually bring up a new pod, direct new traffic to it, and only then shutdown the old pod? This is the default behavior. MaxSurge is number of additional pods that ...
user avatar
  • 925
3 votes
Accepted

How do I setup a script to run on a schedule in a clean & professional way?

AWS Lambda should be an obvious choice together with a a CloudWatch Event trigger https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/RunLambdaSchedule.html . Running an EC2 instance may be ...
user avatar
3 votes
Accepted

How to list all users with specific role in GCP

That can be achieved using another gcloud command: gcloud beta asset search-all-iam-policies --query policy:"roles/owner" --project $your_project_id --flatten="results[].policy[]" --format="csv(...
user avatar
  • 237
3 votes
Accepted

How to download a VM image from GCP?

I don't know of a way to get the actual GCE VM images. But it's possible to export the images to GCS (as a tar.gz archive): If you need to move your Compute Engine boot disk data outside of your ...
user avatar
3 votes
Accepted

What artifact managers are available in GCP?

If the artifacts in question are docker images then the recommended artifact management solution is the Container Registry, well integrated with other GCP products producing and/or using such images. ...
user avatar
3 votes

How should GCP projects be organized?

Google's recommended best practice is to create an Organisation within GCP so that you get access to folders, then model the hierarchy of your organisation within GCP: Some guidance/rules: there ...
user avatar
2 votes
Accepted

If we are using Kubernetes do we need to implement HA on both the infrastructure and application level?

Your application requirements really do influence your options here, maybe add more detail about the app because this subject is very much about your application architecture too. The application ...
user avatar
2 votes
Accepted

How to exclude storage.bucket.list permission on public gcp storage bucket

I am not entirely sure what configs you were using, but here is a process using CLI (gcloud and gsutil). The end product is a new custom role replacing the current standard roles/storage.objectViewer ...
user avatar
  • 161
2 votes

How should GCP projects be organized?

We have two projects: production and staging. Later runs dev, qa also. And for billing purpose, we tag resources accordingly.
user avatar
2 votes

How to know which user created the GCE Instance

Not sure if you sorted this out, but I had to do something similar to get who started the instance so I can badger them into stopping the instance if they are not using it. I put together a Logging ...
user avatar
2 votes
Accepted

Google Cloud Registry and multiple projects

Yes, it's possible. Fundamentally GCR is built on top of Cloud Storage, with roughly the same basic access control: public, i.e completely accessible private, with quite flexible access control from ...
user avatar
2 votes
Accepted

GCP - Can't create a tpu on europe-west1

According to "TPU types and zones" TPUs are only available in a very limited set of regions, namely: Europe, Middle East and Africa europe-west4-a (Eemshaven, Netherlands) Americas us-central1-a, ...
user avatar
2 votes
Accepted

How to connect GCP Load balancer to Kubernetes cluster(single node cluster)

You can use the GCP HTTP(S) Load balancer. Since you are running a kubernetes cluster (Assuming you are using GKE), GKE uses Google compute VM instance groups which can be put behind a load balancer ...
user avatar
  • 951
2 votes

How to list all users with specific role in GCP

Ran into this requirement recently as well. You can achieve this without the use of the assets API. $ gcloud projects get-iam-policy $PROJECT --flatten="bindings[].members" --filter="...
user avatar
  • 21
1 vote

Why is my GCP managed Cert not working with kubernetes

Worked after a while. It apparently needed time to propagate.
user avatar
  • 131
1 vote

how to schedule container in GCP

Add any tiny http-server wrapper to your script and deploy your docker image as a Cloud Run service and use Cloud Scheduler that will invoke it by cron. https://cloud.google.com/run/docs/triggering/...
user avatar
  • 507
1 vote

Accelerate autoscaled VM boot time

To increase the start up time, you need to "bake" (install) more of what is in your start up script into the image. Snapshotting is one method, but I would avoid manually creating instances ...
user avatar
1 vote

How to filter all roles with specific user in GCP

After a bit more googling, I found that post. Sorry! Here is the solution which works for me gcloud projects get-iam-policy MY_PROJECT --format='table(bindings.role)' --filter="bindings.members:...
user avatar
  • 127
1 vote

Predictive autoscaling on K8s

These are presumably proprietary tools for EC2 and GCE respectively. The need for predictive VM autoscaling is pretty strong for Virtual Machines since provisioning time can be measured in the 10's of ...
user avatar
  • 31
1 vote

Is Google Kubernetes (GKE) worth it for a program that runs once a week?

If your workloads are exclusively ephemeral, the answer is probably not worth the infra management effort of deploying K8S. Kubernetes is best suited for types of workloads that are continuous, with ...
user avatar
1 vote
Accepted

How deploy public key to newly created VM on GCP?

As per the link, You can add keys via metadata. You can try the following. metadata: ssh-keys: "[USERNAME]:ssh-rsa [NEW_KEY_VALUE] [USERNAME]" Replace [USERNAME] & [NEW_KEY_VALUE] with ...
user avatar
1 vote

GCP compute quota hard caps?

There is a Quotas page in the GCP console. This Google help doc will tell you more and how to go about identifying your limits and increasing your quotas: https://cloud.google.com/compute/quotas
user avatar
1 vote

What artifact managers are available in GCP?

A new service have been released this year called Artifact Registry
user avatar
1 vote

Installing Helm charts using Terraform

you can use terraform to install helm charts, you dont have to obviously something is probably wrong with your kubernetes connection, check if its actually working
user avatar
1 vote
Accepted

How to allow users to list authorized buckets in GCP Storage?

It's not currently possible to list all the accessible buckets across all cloud projects, neither in the developer console browser nor via the gsutil command. Both of them only display buckets for one ...
user avatar
1 vote

How to recreate GCP Preemptible VMs behind LB before they expire?

Strictly you can't do this with a single preemptable virtual machine as you only get a 30 second grace period. While the majority of calls to the Google Compute Engine API would create a new device ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible