Я использую https://github.com/zalando/postgres-operator для развертывания PostgreSQL экземпляров и имею следующие запущенные экземпляры:
kubectl get postgresqls.acid.zalan.do
NAME TEAM VERSION PODS VOLUME CPU-REQUEST MEMORY-REQUEST AGE STATUS
acid-minimal-cluster acid 12 2 1Gi 2d18h SyncFailed
acid-userdb acid 12 2 5Gi 100m 100Mi 2d18h SyncFailed
databaker-userdb databaker 12 2 2Gi 100m 100Mi 2d18h SyncFailed
databaker-users-db databaker 12 2 2Gi 100m 100Mi 2d17h SyncFailed
Я пытаюсь получить экземпляр следующим образом:
kubectl get postgresql --field-selector NAME=databaker-userdb
Error from server (BadRequest): Unable to find "acid.zalan.do/v1, Resource=postgresqls" that match label selector "", field selector "NAME=databaker-userdb": field label not supported: NAME
как видите, у меня сообщение об ошибке.
Что я делаю не так?
Обновить
Файл yaml
apiVersion: acid.zalan.do/v1
kind: postgresql
metadata:
annotations:
meta.helm.sh/release-name: user-db
meta.helm.sh/release-namespace: default
creationTimestamp: "2020-06-16T15:58:28Z"
generation: 1
labels:
app.kubernetes.io/managed-by: Helm
team: databaker
managedFields:
- apiVersion: acid.zalan.do/v1
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.: {}
f:meta.helm.sh/release-name: {}
f:meta.helm.sh/release-namespace: {}
f:labels:
.: {}
f:app.kubernetes.io/managed-by: {}
f:team: {}
f:spec:
.: {}
f:databases:
.: {}
f:users: {}
f:numberOfInstances: {}
f:postgresql:
.: {}
f:version: {}
f:resources:
.: {}
f:limits:
.: {}
f:cpu: {}
f:memory: {}
f:requests:
.: {}
f:cpu: {}
f:memory: {}
f:teamId: {}
f:users:
.: {}
f:databaker: {}
f:volume:
.: {}
f:size: {}
manager: Go-http-client
operation: Update
time: "2020-06-16T15:58:28Z"
- apiVersion: acid.zalan.do/v1
fieldsType: FieldsV1
fieldsV1:
f:status:
.: {}
f:PostgresClusterStatus: {}
manager: postgres-operator
operation: Update
time: "2020-06-16T15:58:53Z"
name: databaker-users-db
namespace: default
resourceVersion: "68486"
selfLink: /apis/acid.zalan.do/v1/namespaces/default/postgresqls/databaker-users-db
uid: 8bc3b591-4346-4cca-a1ae-682a1ad16615
spec:
databases:
users: databaker
numberOfInstances: 2
postgresql:
version: "12"
resources:
limits:
cpu: 500m
memory: 500Mi
requests:
cpu: 100m
memory: 100Mi
teamId: databaker
users:
databaker:
- superuser
- createdb
volume:
size: 2Gi
status:
PostgresClusterStatus: Running