google-compute-engine

Google Compute Engine (GCE) email delivery solution?

寵の児 提交于 2019-12-21 07:36:13
问题 I've just setup several instances on Google Compute Engine and getting trouble with email delivery system since GCE blocks outbound connections on ports 25, 465, and 587. GCE provides details solution at: https://developers.google.com/compute/docs/networking#mailserver to using postfix to send email via smtp.gmail.com using Google Account. The problem is Gmail has its own sending limits and it will be a big problem for high traffic website which need to send email notifications heavily. Is

Setting environment variable for a Compute Engine VM

牧云@^-^@ 提交于 2019-12-21 05:47:07
问题 I need to set an environment variable within my virtual machine on Google Compute Engine. The variable I need to set is called "GOOGLE_APPLICATION_CREDENTIALS" and according to Google documentation I need to set its value to the path of a json file. I have two questions: 1: Can I set this variable within the Google Compute Engine interface on GCP? 2: Can I use System.Environment.SetEnvironmentVariable("GOOGLE_APPLICATION_CREDENTIALS", Resources.googlecredentials.credentials); ? Whenever I try

http -> https redirect in Google Kubernetes Engine

 ̄綄美尐妖づ 提交于 2019-12-21 03:58:46
问题 I'm looking to redirect all traffic from http://example.com -> https://example.com like how nearly all websites do. I've looked at this link with no success: Kubernetes HTTPS Ingress in Google Container Engine And have tried the following annotations in my ingress.yaml file. nginx.ingress.kubernetes.io/configuration-snippet: | if ($http_x_forwarded_proto != 'https') { return 301 https://$host$request_uri; } nginx.ingress.kubernetes.io/force-ssl-redirect: "true" nginx.ingress.kubernetes.io/ssl

How do I retrieve Google SDK passphrase

假装没事ソ 提交于 2019-12-20 23:33:13
问题 Following this post, I'm trying to transfer code from my local machine to the compute engine but I forgot my passphrase. Can someone tell me how to retrieve it. I've searched around for solutions but found nothing. 回答1: Remove your old keys and try again, that is rm ~/.ssh/google_compute_engine* and then gcloud compute ssh my_vm_name --zone zone_vm_is_in 回答2: this below works as stated by @cherba rm ~/.ssh/google_compute_engine* after using this command you can then reset the password to the

How to get password for sudo

坚强是说给别人听的谎言 提交于 2019-12-20 18:01:37
问题 I'm trying to use the command sudo -i -u postgres for PostgreSQL, and the Google Compute Engine VM is asking me for my password for my account (not root). As I never issued a password, and I always login to my server via SSH key, I'm not sure what the password is, how I can reset it, or where it can be found. Please tell me where I can get my password? 回答1: To become another non-root user on a GCE VM, first become root via password-less sudo (since that's how sudo is configured on GCE VM

Instance environment variables

走远了吗. 提交于 2019-12-20 17:43:21
问题 I have several Google Compute Engine instances, and have set instance metadata on each, under the assumption these are available on the instance itself as an environment variable, but they don't show up. I then read here that I need to query the metadata server for this data, but that just returns a 403 unauthorized when run from the instance itself. Is there a way to access metadata as environment variables? 回答1: It may be worth studying Metadata querying a bit more, but my guess is that you

How to update Google Cloud DNS with ephemeral IP for an instance

試著忘記壹切 提交于 2019-12-20 14:23:40
问题 I have couple of instances on GCE that I don't really need static addresses for, but I still need to make them accessible via dns name. Since ephemeral external ip addresses change every time an instance is restarted, I thought that I could use some sort of startup script to update dns entry for that instance in Google Cloud DNS (a bit like dyndns). Did I miss something and there is an easier way to map ephemeral external ip addresses to a dns record via gcloud? If not, any pointers on how to

Replication Controller VS Deployment in Kubernetes

喜你入骨 提交于 2019-12-20 09:09:05
问题 I wanted to know what is the difference between a Replication Controller and a Deployment within Kubernetes (1.2). Going through the getting started document (http://kubernetes.io/docs/hellonode/) I have created a deployment - but it doesn't show up on the web UI. When I create apps from the web UI - they are created as replication controllers. Functionally though, they seem very similar (they both manage pods and have services). So - what is the difference and when should I use each? 回答1:

How to SSH to docker container in kubernetes cluster?

北城以北 提交于 2019-12-20 08:25:03
问题 I am fairly new to the Google Cloud platform and Docker and set-up a cluster of nodes, made a Dockerfile that copies a repo and runs a Clojure REPL on a public port. I can connect to it from my IDE and play around with my code, awesome! That REPL should however probably tunneled through SSH, but here is where my problem starts. I can't find a suitable place to SSH into for making changes to the repo that Docker runs the REPL on: The exposed IP just exposes the REPL service (correct kubernetes

Trying to clone from github to VM on google cloud compute engine

℡╲_俬逩灬. 提交于 2019-12-20 04:19:48
问题 Im running a VM instance on google cloud compute engine, trying to clone a repsitory on github onto it i get the folowing: Cloning into 'Up'... fatal: unable to access 'https://github.com/MyAccount/project.git/': Could not resolve host: github.com` It's running on ubuntu 16.10 and i have checked both the firewall exceptions in the cloud console. It is worth to note that I was able to clone node.js from github earlier. 回答1: Are you using any systems that could be affected by the DDoS attack