google-cloud-platform

502 Server Error when creating http load balancer in google/GKE

蓝咒 提交于 2021-02-05 11:48:00
问题 My application consists of play web application deployed using GKE. The application was running fine (using Deployment and Loadbalancer service) and then I decided to use Ingress . I made the following changes which has made the application unreachable. I get 502 error when I try to connect with the application using ingress IP. The application is of kind Deployment . apiVersion: apps/v1 kind: Deployment metadata: name: webapp spec: replicas: 2 selector: matchLabels: app: webapp It has a

GCS Generate_Signed_Url expires upon loading

不问归期 提交于 2021-02-05 11:24:06
问题 I am implementing some code to generate a signed url for some images that are specified in a json file, this is the method used to generate them def geturl(image_name): storage_client = storage.Client() bucket = 'Bucket Name' source_bucket = storage_client.get_bucket(bucket) blobs = source_bucket.list_blobs() for blob in blobs: if image_name == blob.name: url_lifetime = 3600 serving_url = blob.generate_signed_url(url_lifetime) return serving_url return after this they are used in an img scr <

Use Cloudflare Authenticated Origin Pull with GCP Cloud Run

帅比萌擦擦* 提交于 2021-02-05 11:22:08
问题 I'm wanting to put Cloudflare in front of my API hosted on Cloud Run. I'd like to ensure my Cloud Run app only accepts connections from Cloudflare (to avoid bypassing DDoS mitigation + rate limiting in Cloudflare). Is there any way to use Cloudflare's Authenticated Origin Pulls with Cloud Run? Other solutions that achieve the same effect are welcome too - however the key is I don't want traffic from non-Cloudflare sources to trigger a Cloud Run invocation (otherwise a DDoS could result in

How to show Rich Response Buttons (''Chips) Using Dialogflow Fulfillment?

為{幸葍}努か 提交于 2021-02-05 10:43:05
问题 Based on the online example I wanted to try to add Rich Response Buttons and Basic cards using Dialogflow Fulfillment and Inline editor, but I'm not getting anything rendered in the Dialogflow Messenger client. Are rich responses not fully supported? 回答1: According to the readme file, the Dialogflow Fulfillment library is no longer being maintained; therefore, it seems that you can't use rich response in Dialogflow messenger directly with this library. Based on this, if you want to use rich

What is the best practice to use kubernetes for local development?

自古美人都是妖i 提交于 2021-02-05 09:16:08
问题 I am using docker containers and have docker-compose files for both local development and production environment. I want to try Google Cloud Platform for my new app and specifically Google Kubernetes Engine. My tools is Docker for Mac with Kubernetes on local machine. It is super important for developers to be able to change code and to see changes live for local development. Use cases: Backend developer make changes to basic Flask API (or whatever you use) and should see changes on reloaded

Firebase Cloud Functions without Cloud Storage

戏子无情 提交于 2021-02-05 08:40:38
问题 I am not sure how technical this question is, but posting it here to request help from firebase / google cloud experts can help me. I have started with cloud functions in Aug 2020 and was able to successfully deploy cloud functions and test without the need for cloud storage. But yesterday I observed that on Sep 17th, 2020, 2 buckets were created in cloud storage and I have been billed for these buckets. There was no change in the way I deployed the cloud functions nor was there any change

Error on setting Environment variables in Google Cloud using the SDK

只谈情不闲聊 提交于 2021-02-05 08:23:27
问题 I am trying to set up Environment Variables for my Django app on Google Cloud. I entered the following on the SDK: gcloud functions deploy env_vars --runtime python37 --set-env-vars SUBSCRIPTION_KEY=1234567890 --trigger-http The error returned was: ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: {"error": {"canonicalCode": "INTERNAL", "errorMessage": "`pip_install_from_wheels` had stderr output:\n/opt/python3.7/bin/python3.7: No module named pip\n\nerror: `pip

No logs are created in Stackdriver logging

最后都变了- 提交于 2021-02-05 07:17:06
问题 In my google app script, I have: Logger.log("test"); and I even tried console.log("test"); But neither is printed to the stackdriver log, even after I've set the project id to a Google Cloud Project id. The screen shows: 回答1: To being able to see the logs on Stackdriver your project should have linked to a Google Cloud Standard project instad of the default project otherwise you only could see the "Stackdriver logs" on the executions pages in https://script.google.com From https://developers

DNS when hosting a static website on Google Cloud Platform bucket

百般思念 提交于 2021-02-05 07:13:06
问题 Sorry if my question may seem messy I have only a basic idea about DNS or hosting. The story is the following: I have created a couple of my personal webpages and registered a domain. Then I found out that I don't need a "big" hosting for my couple of pages and it's better to host a website in the cloud, I chose GCP for hosting, found this tutorial and followed through to successfully achieve my goal of hosting a static website. Then I wanted to share a link to my website in social media and

DNS when hosting a static website on Google Cloud Platform bucket

风格不统一 提交于 2021-02-05 07:13:05
问题 Sorry if my question may seem messy I have only a basic idea about DNS or hosting. The story is the following: I have created a couple of my personal webpages and registered a domain. Then I found out that I don't need a "big" hosting for my couple of pages and it's better to host a website in the cloud, I chose GCP for hosting, found this tutorial and followed through to successfully achieve my goal of hosting a static website. Then I wanted to share a link to my website in social media and