такой сервис:
---
apiVersion: v1
kind: Service
metadata:
name: postgres-analytics
namespace: postgresql-prod
spec:
type: NodePort
ports:
- port: 5432
selector:
app: acid-ИМЯ
В результате в сервисе нет эндпоинтов...
покажи манифест самого пода постгреса
- labelSelector: matchLabels: application: spilo team: acid zpo: acid-ИМЯ topologyKey: kubernetes.io/hostname schedulerName: default-scheduler tolerations: - key: node.kubernetes.io/not-ready operator: Exists effect: NoExecute tolerationSeconds: 300 - key: node.kubernetes.io/unreachable operator: Exists effect: NoExecute tolerationSeconds: 300 priority: 0 enableServiceLinks: true status: phase: Running conditions: - type: Initialized status: 'True' lastProbeTime: null lastTransitionTime: '2022-01-20T10:14:20Z' - type: Ready status: 'True' lastProbeTime: null lastTransitionTime: '2022-01-20T10:14:41Z' - type: ContainersReady status: 'True' lastProbeTime: null lastTransitionTime: '2022-01-20T10:14:41Z' - type: PodScheduled status: 'True' lastProbeTime: null lastTransitionTime: '2022-01-20T10:14:20Z' hostIP: 192.168.65.XX podIP: 10.233.124.198 podIPs: - ip: 10.233.124.198 startTime: '2022-01-20T10:14:20Z' containerStatuses: - name: postgres state: running: startedAt: '2022-01-20T10:14:41Z' lastState: {} ready: true restartCount: 0 image: 'registry.opensource.zalan.do/acid/spilo-12:1.6-p3' imageID: >- docker-pullable://registry.opensource.zalan.do/acid/spilo-12@sha256:9cadab40d2adf205bda398623ad814a0fea47779944ca9d2cdde28647ae0fca7 containerID: >- docker://561d39b09e41f1909fcc36c929c04af4d0ade96eadefcdeed4383198da33a155 started: true qosClass: Burstable
Портянка! kind: Pod apiVersion: v1 metadata: name: acid-ИМЯ-0 generateName: acid-ИМЯ- namespace: postgresql-prod selfLink: /api/v1/namespaces/postgresql-prod/pods/acid-ИМЯ-0 uid: 7e0370c2-73be-44d9-94a5-a4a7ad589ea2 resourceVersion: '401440420' creationTimestamp: '2022-01-20T10:14:18Z' labels: application: spilo controller-revision-hash: acid-ИМЯ-58d86f9f55 spilo-role: master statefulset.kubernetes.io/pod-name: acid-ИМЯ-0 team: acid zpo: acid-ИМЯ annotations: status: >- {"conn_url":"postgres://10.233.124.198:5432/postgres","api_url":"http://10.233.124.198:8008/patroni","state":"running","role":"master","version":"1.6.5","xlog_location":117440512,"timeline":1} ownerReferences: - apiVersion: apps/v1 kind: StatefulSet name: acid-ИМЯ uid: 89784ba2-0c7f-4110-96b3-ae469e0456f4 controller: true blockOwnerDeletion: true spec: volumes: - name: pgdata persistentVolumeClaim: claimName: pgdata-acid-ИМЯ-0 - name: dshm emptyDir: medium: Memory - name: postgres-pod-token-flppx secret: secretName: postgres-pod-token-flppx defaultMode: 420 containers: - name: postgres image: 'registry.opensource.zalan.do/acid/spilo-12:1.6-p3' ports: - containerPort: 8008 protocol: TCP - containerPort: 5432 protocol: TCP - containerPort: 8080 protocol: TCP env: - name: SCOPE value: acid-ИМЯ - name: PGROOT value: /home/postgres/pgdata/pgroot - name: POD_IP valueFrom: fieldRef: apiVersion: v1 fieldPath: status.podIP - name: POD_NAMESPACE valueFrom: fieldRef: apiVersion: v1 fieldPath: metadata.namespace - name: PGUSER_SUPERUSER value: postgres - name: KUBERNETES_SCOPE_LABEL value: zpo - name: KUBERNETES_ROLE_LABEL value: spilo-role - name: PGPASSWORD_SUPERUSER valueFrom: secretKeyRef: name: >- postgres.acid-ИМЯ.credentials.postgresql.acid.zalan.do key: password - name: PGUSER_STANDBY value: standby - name: PGPASSWORD_STANDBY valueFrom: secretKeyRef: name: >- standby.acid-ИМЯ.credentials.postgresql.acid.zalan.do key: password - name: PAM_OAUTH2 value: >- https://info.example.com/oauth2/tokeninfo?access_token= uid realm=/employees - name: HUMAN_ROLE value: zalandos - name: KUBERNETES_LABELS value: '{"application":"spilo"}' - name: SPILO_CONFIGURATION value: >- {"postgresql":{"bin_dir":"/usr/lib/postgresql/12/bin"},"bootstrap":{"initdb":[{"auth-host":"md5"},{"auth-local":"trust"}],"users":{"zalandos":{"password":"","options":["CREATEDB","NOLOGIN"]}},"dcs":{}}} - name: DCS_ENABLE_KUBERNETES_API value: 'true' resources: limits: cpu: 500m memory: 500Mi requests: cpu: 100m memory: 100Mi volumeMounts: - name: pgdata mountPath: /home/postgres/pgdata - name: dshm mountPath: /dev/shm - name: postgres-pod-token-flppx readOnly: true mountPath: /var/run/secrets/kubernetes.io/serviceaccount terminationMessagePath: /dev/termination-log terminationMessagePolicy: File imagePullPolicy: IfNotPresent securityContext: privileged: false readOnlyRootFilesystem: false restartPolicy: Always terminationGracePeriodSeconds: 300 dnsPolicy: ClusterFirst serviceAccountName: postgres-pod serviceAccount: postgres-pod nodeName: k1w1 securityContext: {} hostname: acid-ИМЯ-0 subdomain: acid-ИМЯ affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution:
Обсуждают сегодня