我正在调查可用于:部署和更新微服务型应用程序的谷歌云工具。到目前为止,我的注意力集中在两个解决方案上:(a) 容器集群;(b) 托管实例组加上自动调节程序。你能不能帮我决定我应该走哪条路。您会在下面找到一些详细信息和要求:
我为解决方案 (a) 和解决方案 (b) 做了一个 MWE。到目前为止,我认为我不会使用 kubernetes 功能。因此我更倾向于解决方案(b)。
你怎么认为 ?
最好的,弗朗索瓦。
google-compute-engine google-cloud-platform kubernetes google-kubernetes-engine
https://cloud.google.com/sdk/docs/quickstart-mac-os-x
我下载了 tar,然后运行 install.sh
接下来我收到了这条消息,但是我没有看到任何 rc / .rc 文件?
To update your SDK installation to the latest version [162.0.1], run:
$ gcloud components update
Modify profile to update your $PATH and enable shell command
completion?
Do you want to continue (Y/n)? y
The Google Cloud SDK installer will now prompt you to update an rc
file to bring the Google Cloud CLIs into your environment.
Enter a path to an rc file to update, or leave blank to use
[/Users/leongaban/.zshrc]:
Run Code Online (Sandbox Code Playgroud)
我正在尝试使用 Google Cloud api 创建一个 ServiceAccount。我是代表用户进行身份验证的 Oauth 客户端。我正在使用正确的范围。我仍然收到错误403: Permission iam.serviceAccounts.create is required to perform this operation on project projects/xyz。
此代码以前可以使用。我看到新文档也提到了这一点;https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/create
我的问题是我做错了什么。我该如何解决这个问题?
我对 kubernetes 很陌生,此时我想做的就是重新启动我的集群并让它运行更新的 dockerfile。顺便说一下,我正在 google-cloud-platform 中运行 kubernetes。
我对 Kubernetes 很陌生,我已经在 Kubernetes 上部署了一个集群。创建了一个部署并将 POD 的计数设置为 2。我没有为此部署创建 HPA。
为此,我正在使用 Google Cloud。我为集群启用了自动缩放。最小值为 2,最大值为 30。
我在部署中遇到了OOMKilled错误。
所以问题是
所以只有 HPA 可以增加/减少 PODS 数量,对吗??。在这种情况下,基于内存和 CPU 的 HPA 是每个部署都必须和应该的。
如果我错了,请纠正我。
我已经persistentVolumeClaim在我的自定义 Kubernetes 集群上创建了一个,但是它似乎陷入了待定状态...
我需要安装/配置一些额外的东西吗?还是此功能仅在 GCP/AWS 上可用?
PVC.yaml
apiVersion: v1
kind: PersistentVolumeClaim
spec:
storageClassName: standard
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
metadata:
name: testingchris
Run Code Online (Sandbox Code Playgroud)
描述PVC:
Name: testingchris
Namespace: diyclientapps
StorageClass: standard
Status: Pending
Volume:
Labels: <none>
Annotations: kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"v1","kind":"PersistentVolumeClaim","metadata":{"annotations":{},"name":"testingchris","namespace":"diyclientapps"},"spec":{"accessModes"...
Finalizers: []
Capacity:
Access Modes:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning ProvisioningFailed 8s (x3 over 36s) persistentvolume-controller storageclass.storage.k8s.io "standard" not found
Run Code Online (Sandbox Code Playgroud) 每当我必须使用gcloudsdk部署新的 python 函数时,我都会收到此消息
允许未经身份验证的新函数 [function-name] 调用?
(是/否)?
警告:使用受限访问 IAM 策略创建的函数。要启用未经授权的访问,请考虑
“gcloud alpha 函数 add-iam-policy-binding function-name --region=europe-west1 --member=allUsers --role=roles/cloudfunctions.invoker”
是否有任何标志可以添加到命令中以使其NO在部署时成为一个?
这是我用来部署一个函数的示例命令:
gcloud functions deploy function-name --region=europe-west1 --entry-point function-entry-point --trigger-resource "projects/my-project/databases/(default)/documents/user_ids/{user_id}" --trigger-event providers/cloud.firestore/eventTypes/document.create --runtime python37 --timeout 60 --project my-project
Run Code Online (Sandbox Code Playgroud) python google-cloud-platform gcloud gcloud-python google-cloud-functions
为此,我正在使用 Google Cloud Console。创建服务帐户时,我可以分配特定角色。但是在我创建它之后,我没有看到更新服务帐户角色的选项。
我尝试编辑服务帐户,但仍然没有添加或删除角色的选项。我在这里缺少什么?
service-accounts google-cloud-console google-cloud-platform gcloud
我正面临这个奇怪的问题。我的一些(5%)芹菜任务被默默地放弃了。
在 celery 日志中做一些挖掘,我发现在某些情况下,为不同的任务生成相同的任务 ID。自然地,任何新任务都会覆盖具有相同任务 ID 的现有任务;导致旧任务静默删除(如果它没有执行)。
在 1.5 小时内,生成了 3 次相同的 UUID。我做了一些随机抽样,结果在同一台机器上在很短的时间内(1-2 小时)出现了这种情况。服务器每天生成大约 100 万个 UUID。与38 位数字相比的 7 位数字- 可能的 UUID 数量。
我在 Linux VM 上运行 python 3.6 和 celery 4.4.2。
Celery 使用 python 的uuid.uuid4:参考
我不知道如何从这里开始。某个版本的 python(或 linux 内核)中是否存在错误、某些配置问题或硬件/VM 错误?所有情况似乎都不太可能。
更新:
VM 是运行 ubuntu 18 LTS 的标准 Google Cloud Platform 计算实例。
我一直在使用谷歌云平台为客户提供服务。前几天发现VM的CPU使用率不断增加的问题。为了找出这个问题的原因,我制作了空的(或新的)虚拟机来观察它们的状态,这些新的虚拟机也不断增加它们的 CPU 使用率。
我用“top”命令知道哪个进程占用CPU资源,结果让我震惊。“google_osconfig”不断消耗CPU资源,吃得越来越像猪。
什么是“google_osconfig”,有没有人知道解决这个问题?
我重新启动了 google-osconfig-agent 以使其释放 CPU 使用率。使用“service google-osconfig-agent restart”后,CPU使用率下降。