我最近了解了 kubectl--field-selector标志,但在尝试将其与各种对象一起使用时遇到了错误。
例如 :
$ kubectl delete jobs.batch --field-selector status.succeeded==1
Error from server (BadRequest): Unable to find "batch/v1, Resource=jobs" that match label selector "", field selector "status.succeeded==1": field label "status.succeeded" not supported for batchv1.Job
Run Code Online (Sandbox Code Playgroud)
根据文档, Supported field selectors vary by Kubernetes resource type.,所以我想这种行为是可以预料的。
烦人的部分是我必须单独尝试每个字段才能知道我是否可以使用它们。
有没有办法获得给定资源类型/资源版本/kubectl 版本支持的所有字段?
我一直在尝试设置一个 terraform 后端来将状态文件存储在 GCS 存储桶中。我创建了一个服务帐户,该帐户是项目所有者并具有 gcs 存储桶存储管理员访问权限,但仍然面临以下错误:
Initializing the backend...
Error loading state: 2 errors occurred:
* writing "gs://terraform-ubuntu-state-maintain/gcp/terraform.tfstate/default.tflock" failed: googleapi: Error 403: Insufficient Permission, insufficientPer
missions
* storage: object doesn't exist.
Run Code Online (Sandbox Code Playgroud)
ps:gcs 存储桶也已使用前缀路径“gcp”创建。此外,还向服务帐户授予权限。
google-cloud-storage google-cloud-platform terraform terraform-provider-gcp