gcloud

Is there any way to use gcloud with python3?

时光毁灭记忆、已成空白 提交于 2020-05-09 20:02:22
问题 I have a little confused about gcloud with python3 After I installed gcloud in python3 env and I tried to example Quickstart for Python in the App Engine Flexible Environment. It said 'You need Google Cloud SDK', so I installed SDK. All the process after SDK(including SDK), It needs python2 env. Here is a question, Is is impossible to run gcloud with python3 (officially ) yet? (SDK and python2 with gcloud library is best way?) 回答1: I worked around this issue by specifying the path to Python 2

How to find, list, or search resources across services (APIs) and projects in Google Cloud Platform?

不羁的心 提交于 2020-05-08 05:55:08
问题 In Google Cloud Platform (GCP), you can use list APIs or commands to list resources in a given project for a given type in a given service, like BigQuery datasets or compute instances. But how to find or search resources across types, services, or even projects? 回答1: You can use search-all-resources to search all the resources across services (or APIs) and projects for a given organization, folder, or project. To search all the resources in a project with number 123: $ gcloud beta asset

GCLOUD Kubernetes in f1-micro results in (Node pools of f1-micro machines are not supported due to insufficient memory)

╄→尐↘猪︶ㄣ 提交于 2020-04-30 06:25:42
问题 I tried to start a new f1-micro node in my cluster using Googles UI and it silently fails. So I decided to run it using gcloud to see if that one provides more details And so I ran the following gcloud container node-pools create my-f1-pool --image-type ubuntu --machine-type=f1-micro --cluster bcomm-sg-cluster --disk-size=10GB --enable-autoscaling --min-nodes=2 --max-nodes=6 --zone=asia-southeast1-a --enable-autorepair This is the result I got instead WARNING: Modifications on the boot disks

why am i getting (gsutil): “C:\Users\user\AppData\Local\Programs\Python\Python37\python.exe”: command not found

冷暖自知 提交于 2020-04-17 06:25:39
问题 After installing Google cloud sdk and connecting to desired firebase project i am receiving : ERROR: (gsutil) "C:\Users\user\AppData\Local\Programs\Python\Python37\python.exe": command not found when running any gsutil command. My current stup is: windows 10 Google Cloud SDK 281.0.0 bq 2.0.53 core 2020.02.14 gsutil 4.47 python 3.7 My theory is, that while installed "correctly" python doesnt have access to gsutil commands 回答1: To see a list of components that are available and currently

-bash: gcloud: command not found on Mac

混江龙づ霸主 提交于 2020-04-08 00:23:59
问题 I'm following the Quickstart for Mac OS X to install the cloud SDK. Following the steps exactly, 1) python -V returns "Python 2.7.10" 2) Download and extract using ./install.sh the 64bit version of the SDK in google-cloud-sdk returns... Welcome to the Google Cloud SDK! To help improve the quality of this product, we collect anonymized usage data and anonymized stacktraces when crashes are encountered; additional information is available at <https://cloud.google.com/sdk/usage-statistics>. You

-bash: gcloud: command not found on Mac

北慕城南 提交于 2020-04-08 00:22:12
问题 I'm following the Quickstart for Mac OS X to install the cloud SDK. Following the steps exactly, 1) python -V returns "Python 2.7.10" 2) Download and extract using ./install.sh the 64bit version of the SDK in google-cloud-sdk returns... Welcome to the Google Cloud SDK! To help improve the quality of this product, we collect anonymized usage data and anonymized stacktraces when crashes are encountered; additional information is available at <https://cloud.google.com/sdk/usage-statistics>. You

gcloud compute execute command remotely

自作多情 提交于 2020-04-07 14:33:48
问题 Currently, if I want to execute something on a VM, I copy files over like this: gcloud compute --project <project_id> copy-files --zone <zone_name> /home/roman/source/dir roman@<vm_name>:/some/path Then I need to SSH into it manually like this: gcloud compute --project <project_id> ssh --zone <zone_name> <vm_name> And then go and run some command: cd /some/path python example.py How do I combine step 2 and 3 together and execute a command remotely? Note: I want to use gcloud or the python api

Kubernetes Node全解

南笙酒味 提交于 2020-04-06 20:56:18
今晚20:30,Kubernetes Master Class在线培训第四期《企业如何构建CI/CD流水线》即将开播,点击链接: http://live.vhall.com/729465809 即可免费预约注册! 介 绍 Kubernetes在GitHub上拥有超过48,000颗星,超过75,000个commit,拥有以Google为代表的科技巨头公司为主要贡献者。可以说,Kubernetes已迅速掌管了容器生态系统,成为容器编排平台的真正领导者。 Kubernetes提供了诸如部署的滚动和回滚、容器健康检查、自动容器恢复、基于指标的容器自动扩展、服务负载均衡、服务发现(适用于微服务架构)等强大功能。在本文中,我们将讨论Kubernetes重要的基本概念、master节点架构,并重点关注节点组件。 理解Kubernetes及其抽象 Kubernetes是一个开源的编排引擎,用于自动部署、扩展、管理和提供托管容器化应用程序的基础架构。在基础架构级别,Kubernetes集群由一组物理或虚拟机组成,每个机器都以特定角色运行。 Master机器就像是所有业务的大脑,负责编排所有运行在节点机器上的容器。每个节点都配有一个容器运行时。节点接收来自master的指令,然后执行操作来创建pod、删除pod或调整网络规则。 Master组件负责管理Kubernetes集群。它们管理pod的生命周期

How to log from a custom ai platform model

喜你入骨 提交于 2020-04-06 14:02:24
问题 I recently deployed a custom model to google cloud's ai-platform, and I am trying to debug some parts of my preprocessing logic. However, My print statements are not being logged to the stackdriver output. I have also tried using the logging client imported from google.cloud, to no avail. Here is my custom prediction file: import os import pickle import numpy as np from sklearn.datasets import load_iris import tensorflow as tf from google.cloud import logging class MyPredictor(object): def _

How to list, find, or search iam policies across services (APIs), resource types, and projects in google cloud platform (GCP)?

六眼飞鱼酱① 提交于 2020-04-05 05:29:27
问题 In Google Cloud Platform (GCP), you can only get the IAM policy for a specific resource by calling getIamPolicy (get-iam-policy in gcloud). Is there a way to list, search, list, search, or find IAM policies across resources, services, or projects? This is needed to answer questions like: What roles does a service account have? Which resources are shared publicly? Do policies contain deleted users? Does a user still appear in any policies after they leave my company? Does a user has a given