{"id":338169,"date":"2022-09-09T09:00:38","date_gmt":"2022-09-09T09:00:38","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=338169"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=338169","title":{"rendered":"<span>\u041e\u0431\u0437\u043e\u0440 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 PostgreSQL \u0434\u043b\u044f Kubernetes. \u0427\u0430\u0441\u0442\u044c 3: CloudNativePG<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0421\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u043d\u0430\u0448 \u043e\u0431\u0437\u043e\u0440\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u043e PostgreSQL-\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445 \u0434\u043b\u044f Kubernetes. <a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/520616\/\">\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b Stolon, Crunchy Data \u0438 Zalando. <a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/527524\/\">\u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439<\/a> \u2014 KubeDB \u0438 StackGres, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b\u0438 \u0432\u0441\u0435 \u043f\u044f\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0432 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443. \u0412 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437  \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 CloudNativePG, \u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0430 \u0437\u0430\u043e\u0434\u043d\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/939\/2ae\/ca8\/9392aeca894d0f5c4bcd7ba2fcc36f48.png\" width=\"1878\" height=\"1080\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/939\/2ae\/ca8\/9392aeca894d0f5c4bcd7ba2fcc36f48.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u0430\u043f\u0440\u0435\u043b\u044f 2022 \u0433\u043e\u0434\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f <a href=\"https:\/\/www.enterprisedb.com\/\"><u>EnterpriseDB<\/u><\/a> \u043f\u043e\u0434 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439 Apache License 2.0 \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0430 <a href=\"https:\/\/github.com\/cloudnative-pg\/cloudnative-pg\"><u>CloudNativePG<\/u><\/a> \u2014 Open Source-\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 PostgreSQL \u0434\u043b\u044f Kubernetes. \u042d\u0442\u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0445\u043e\u0440\u043e\u0448\u043e <a href=\"https:\/\/cloudnative-pg.io\/docs\/\"><u>\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d<\/u><\/a>, \u0433\u0438\u0431\u043e\u043a \u0438 \u0443\u0434\u043e\u0431\u0435\u043d \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438, \u0441 \u0448\u0438\u0440\u043e\u043a\u0438\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<h3>\u041d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b<\/h3>\n<p>\u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 CloudNativePG \u0432 Kubernetes \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 <a href=\"https:\/\/github.com\/cloudnative-pg\/cloudnative-pg\/tree\/main\/releases\"><u>\u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 YAML<\/u><\/a> \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435 \u043a \u043d\u0435\u043c\u0443 <code>kubectl apply<\/code>. \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u044b CustomResourceDefinition: <em>Cluster<\/em>, <em>Pooler<\/em>, <em>Backup<\/em> \u0438 <em>ScheduledBackup<\/em> \u2014 \u043e \u043d\u0438\u0445 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043d\u0438\u0436\u0435.<\/p>\n<p>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 <a href=\"https:\/\/hub.docker.com\/_\/postgres\"><u>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 PostgreSQL<\/u><\/a>. \u041f\u043e\u043c\u0438\u043c\u043e \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 Docker-\u043e\u0431\u0440\u0430\u0437\u043e\u0432 PostgreSQL \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <a href=\"https:\/\/cloudnative-pg.io\/documentation\/1.16\/container_images\/\"><em><u>Container Image Requirements<\/u><\/em><\/a> \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 <code>spec.bootstrap<\/code> \u0440\u0435\u0441\u0443\u0440\u0441\u0430 <em>Cluster<\/em>: <\/p>\n<ul>\n<li>\n<p>\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u2014 <code>initdb<\/code>; <\/p>\n<\/li>\n<li>\n<p>\u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0437 \u0431\u044d\u043a\u0430\u043f\u0430 \u2014 <code>recovery<\/code> (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 PITR, \u0438\u043b\u0438 <code>point-in-time recovery<\/code> \u2014 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438);<\/p>\n<\/li>\n<li>\n<p>\u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e PostgreSQL \u2014 <code>pg_basebackup<\/code> (\u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u043f\u0440\u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445).<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u0442\u0438\u043f\u043e\u0432\u043e\u0439 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 <em>grafana-pg<\/em> \u0438\u0437 \u0442\u0440\u0451\u0445 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 \u0441 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435:<\/p>\n<pre><code class=\"yaml\">--- apiVersion: postgresql.cnpg.io\/v1 kind: Cluster metadata:   name: grafana-pg # \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. spec:   instances: 3   primaryUpdateStrategy: unsupervised   storage:     storageClass: local     size: 1Gi   bootstrap:     initdb: # \u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.       database: grafana       owner: grafana       secret:         name: grafana-pg-user --- apiVersion: v1 kind: Secret # Secret \u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u0430\u043c\u0438 \u043a \u0411\u0414. metadata:   name: grafana-pg-user data:   username: {{ .Values.postgres.user | b64enc }}   password: {{ .Values.postgres.password | b64enc }} type: kubernetes.io\/basic-auth<\/code><\/pre>\n<p>\u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 Cloud Native, \u043a\u0430\u0436\u0434\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043b\u0443\u0447\u0448\u0435 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c PostgreSQL. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u043c <code>initdb<\/code> \u0432 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0443 \u0431\u0430\u0437\u0443. \u0423 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043c\u043d\u043e\u0433\u043e \u043f\u043b\u044e\u0441\u043e\u0432; \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043d\u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <a href=\"https:\/\/cloudnative-pg.io\/documentation\/1.16\/faq\/#database-management\"><em><u>Frequently Asked Questions (FAQ)<\/u><\/em><\/a> \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u0430\u0437\u044b \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u043e\u0434 \u0441\u0443\u043f\u0435\u0440\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c <code>postgres<\/code>. \u041b\u0438\u0431\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u0441\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u0438\u0445 \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 <code>spec.bootstrap.initdb.postInitSQL<\/code>.<\/p>\n<h3>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430, \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f, \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c<\/h3>\n<p>\u041e\u0434\u043d\u0430 \u0438\u0437 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u2014 \u043e\u0442\u043a\u0430\u0437 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Patroni \u0438\u043b\u0438 Stolon. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0432 \u043a\u0430\u0436\u0434\u044b\u0439 Pod \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b <code>\/controller\/manager<\/code>, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 <code>Instance Manager<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 Kubernetes API.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 PostgreSQL \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 (probes) \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438, \u043e\u043d \u043f\u043e\u043c\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0438\u0441\u043f\u0440\u0430\u0432\u043d\u044b\u043c, \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 <code>-ro<\/code> \u0438 <code>-r<\/code> \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f. \u0417\u0430\u0442\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441 master\u2019\u043e\u043c, \u0438 \u043f\u0440\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u0445 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0432\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u044e. \u041f\u0440\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0440\u043e\u043b\u044c master\u2019\u0430 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u043c\u0443 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e Pod\u2019\u044b \u0441 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430\u043c\u0438 \u0411\u0414, \u0430 \u043d\u0435 ReplicaSet \u0438\u043b\u0438 StatefulSet. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0431\u0435\u0441\u043f\u0435\u0440\u0435\u0431\u043e\u0439\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e Pod\u2019\u043e\u0432 \u0441 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c, \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432 \u0447\u0438\u0441\u043b\u043e \u0440\u0435\u043f\u043b\u0438\u043a \u0432<strong> <\/strong><code>deployment cnpg-controller-manager<\/code><strong>.<\/strong><\/p>\n<p>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e) \u0438 <a href=\"https:\/\/postgrespro.ru\/docs\/postgrespro\/14\/warm-standby#SYNCHRONOUS-REPLICATION\"><u>\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439<\/u><\/a> (\u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u0432\u043e\u0440\u0443\u043c\u0430) \u0442\u0438\u043f\u044b \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432. \u0427\u0438\u0441\u043b\u043e \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0440\u0435\u043f\u043b\u0438\u043a \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 <code>minSyncReplicas<\/code> \u0438 <code>maxSyncReplicas<\/code>.<\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e local storage \u043d\u0430 K8s-\u0443\u0437\u043b\u0430\u0445. \u041f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 Pod\u2019\u0430 \u0441 PostgreSQL \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u0430 \u0443\u0437\u043b\u0435 PVC \u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c PGDATA \u0438 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e, \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0432 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0435 WAL. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430 \u043d\u043e\u0432\u044b\u0439 \u0443\u0437\u0435\u043b PostgreSQL \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442 \u043f\u0443\u0442\u0451\u043c \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 master-\u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u043d\u0438\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 \u0441\u0435\u0442\u044c \u0438 \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0443\u0437\u043b\u043e\u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a PostgreSQL \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 (\u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430) \u043d\u0430\u0431\u043e\u0440 Service\u2019\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0435\u0436\u0438\u043c\u043e\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043f\u0438\u0441\u043e\u043a Service\u2019\u043e\u0432 \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 <em>grafana-pg<\/em>:<\/p>\n<ul>\n<li>\n<p><em>grafana-pg-rw<\/em> \u2014 \u0447\u0442\u0435\u043d\u0438\u0435\/\u0437\u0430\u043f\u0438\u0441\u044c \u0441 master-\u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430;<\/p>\n<\/li>\n<li>\n<p><em>grafana-pg-ro<\/em> \u2014 \u0447\u0442\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0440\u0435\u043f\u043b\u0438\u043a;<\/p>\n<\/li>\n<li>\n<p><em>grafana-pg-r<\/em> \u2014 \u0447\u0442\u0435\u043d\u0438\u0435 \u0441 \u043b\u044e\u0431\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 <em>grafana-pg-any<\/em> \u2014 \u043e\u043d \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0439 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d.<\/p>\n<h3>\u0413\u0438\u0431\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 Kubernetes<\/h3>\n<p>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0434\u0430\u0442\u044c \u0434\u043b\u044f Pod\u2019\u043e\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 <em>affinity<\/em>\/<em>anti-affinity<\/em>, <em>nodeSelector<\/em> \u0438 <em>tolerations<\/em>. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u043e\u0434\u0443\u043c\u0430\u043b\u0438 \u0437\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 <em>anti-affinity<\/em> \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u043d\u043e\u0441\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u044b \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 PostgreSQL \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0435 \u0443\u0437\u043b\u044b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 Kubernetes:<\/p>\n<pre><code class=\"yaml\"> affinity:     enablePodAntiAffinity: true # Default value.     topologyKey: kubernetes.io\/hostname # Default value.     podAntiAffinityType: preferred # Default value.<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u0440\u0430\u0432\u0438\u043b <em>affinity\/anti-affinity<\/em> \u0447\u0435\u0440\u0435\u0437 <code>additionalPodAntiAffinity<\/code> \u0438 <code>additionalPodAffinity<\/code>:<\/p>\n<pre><code class=\"yaml\">   additionalPodAntiAffinity:       requiredDuringSchedulingIgnoredDuringExecution:       - labelSelector:           matchExpressions:           - key: postgresql             operator: Exists             values: []         topologyKey: \"kubernetes.io\/hostname\"<\/code><\/pre>\n<h3>\u0420\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0411\u044d\u043a\u0430\u043f\u044b \u0432 CloudNativePG \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <a href=\"https:\/\/pgbarman.org\/\"><u>Barman<\/u><\/a> \u2014 \u043c\u043e\u0449\u043d\u043e\u0433\u043e Open Source-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f PostgreSQL.<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b AWS S3, Microsoft Azure Blob Storage \u0438 Google Cloud Storage, \u0430 \u0442\u0430\u043a\u0436\u0435 S3-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, MinIO \u0438 Linode. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u0441\u0436\u0430\u0442\u0438\u044f (gzip, bzip2, snappy) \u0438 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>\u0411\u044d\u043a\u0430\u043f\u044b \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 <code>spec.backup<\/code> \u0440\u0435\u0441\u0443\u0440\u0441\u0430 <em>Cluster<\/em>. \u041f\u0440\u0438\u0432\u0435\u0434\u0451\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 S3-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435:<\/p>\n<pre><code class=\"yaml\">backup:   retentionPolicy: \"30d\" # C\u0440\u043e\u043a \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u0430.   barmanObjectStore:     destinationPath: \"s3:\/\/grafana-backup\/backups\" # \u041f\u0443\u0442\u044c \u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443.     endpointURL: \"https:\/\/s3.storage.foo.bar\" # \u0421\u0435\u0440\u0432\u0438\u0441 S3.     s3Credentials: # \u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a bucket\u2019\u0443.       accessKeyId:         name: s3-creds         key: accessKeyId       secretAccessKey:         name: s3-creds         key: secretAccessKey     wal:       compression: gzip # \u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u0441\u0436\u0430\u0442\u0438\u0435 WAL.<\/code><\/pre>\n<p>\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0436\u0443\u0440\u043d\u0430\u043b\u043e\u0432 \u043f\u0440\u0435\u0434\u0437\u0430\u043f\u0438\u0441\u0438 WAL \u0441 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c \u0432 5 \u043c\u0438\u043d\u0443\u0442 \u043d\u0430\u0447\u043d\u0451\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430. \u0414\u043b\u044f \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u043d\u043e\u0439 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0439 \u043a\u043e\u043f\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0440\u0435\u0441\u0443\u0440\u0441 <em>Backup<\/em>. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0431\u044d\u043a\u0430\u043f \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>ScheduledBackup<\/code>:\u00a0<\/p>\n<pre><code class=\"yaml\">--- apiVersion: postgresql.cnpg.io\/v1 kind: ScheduledBackup metadata:   name: grafana-pg-backup spec:   immediate: true # \u0421\u0442\u0430\u0440\u0442 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0439 \u043a\u043e\u043f\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f ScheduledBackup.   schedule: \"0 0 0 * * *\"   cluster:     name: grafana-pg<\/code><\/pre>\n<p>\u041e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0444\u043e\u0440\u043c\u0430\u0442 \u0437\u0430\u043f\u0438\u0441\u0438 <code>spec.schedule<\/code> \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e <code>cron<\/code>, \u0438\u043c\u0435\u0435\u0442 6 \u043f\u043e\u043b\u0435\u0439 \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0441\u0435\u043a\u0443\u043d\u0434\u044b.<\/p>\n<p>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0430\u0440\u0445\u0438\u0432\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b\u0438 \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043f\u0440\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u043a \u0441\u0432\u0435\u0436\u0435\u043c\u0443 \u0431\u044d\u043a\u0430\u043f\u0443 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u0441\u044f WAL. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u00ab\u0440\u0443\u0447\u043d\u0430\u044f\u00bb \u043a\u043e\u043f\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0435\u0440\u0442\u0430 \u0438\u0437 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u043f\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u043e\u0439 <code>retentionPolicy<\/code> \u0441\u0440\u043e\u043a\u0430, \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/p>\n<p>\u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0433\u0440\u0430\u0431\u043b\u044f\u0445, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043d\u0430\u0441\u0442\u0443\u043f\u0438\u043b\u0438 \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0431\u044d\u043a\u0430\u043f\u043e\u0432.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0430 \u0431\u044b\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u043d\u044b\u0445 \u0430\u0440\u0445\u0438\u0432\u043e\u0432. \u041e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c, \u043d\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b, \u0447\u0442\u043e \u0431\u044d\u043a\u0430\u043f \u0432\u0441\u0451 \u0435\u0449\u0451 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f:<\/p>\n<pre><code>kubectl -n grafana get backups.postgresql.cnpg.io grafana-pg-backup-1655737200 -o yaml --- apiVersion: postgresql.cnpg.io\/v1 kind: Backup   [...] status:   phase: running<\/code><\/pre>\n<p>\u0421\u0442\u0430\u043b\u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0438 \u043f\u043e\u043d\u044f\u043b\u0438, \u0447\u0442\u043e <code>status.phase<\/code> \u043d\u0435\u0432\u0435\u0440\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e Barman \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 bucket S3. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 <code>endpointURL<\/code> \u0438 <code>destinationPath<\/code>. \u042d\u0442\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 S3-\u0441\u0435\u0440\u0432\u0438\u0441 \u0438 \u043f\u0443\u0442\u044c \u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0432 <a href=\"https:\/\/docs.aws.amazon.com\/AmazonS3\/latest\/userguide\/access-bucket-intro.html#virtual-host-style-url-ex\"><u>Virtual-hosted-style<\/u><\/a><u>&#8212;<\/u> \u0438 <a href=\"https:\/\/docs.aws.amazon.com\/AmazonS3\/latest\/userguide\/access-bucket-intro.html#path-style-url-ex\"><u>Path-style-\u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445<\/u><\/a>. \u0412 <a href=\"https:\/\/cloudnative-pg.io\/documentation\/1.16\/backup_recovery\/\"><u>\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0443<\/u><\/a> \u043d\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c \u0447\u0435\u0442\u043a\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f, \u043a\u0430\u043a\u043e\u0439 \u0438\u0437 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0441 \u043b\u0435\u0433\u043a\u043e\u0439 \u0440\u0443\u043a\u0438 \u0431\u044b\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u044b:<\/p>\n<pre><code class=\"yaml\">backup:   barmanObjectStore:     destinationPath: \"s3:\/\/backups\/\"     endpointURL: \"https:\/\/grafana-backup.s3.storage.foo.bar\"<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f <code>endpointURL<\/code> \u043a \u0444\u043e\u0440\u043c\u0430\u0442\u0443 <code>Path-style<\/code>, \u0430 <code>destinationPath<\/code> \u043a \u0432\u0438\u0434\u0443 <code>s3:\/\/BUCKET_NAME\/path\/to\/folder<\/code>, \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u043e\u0441\u044c \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>status.phase<\/code> \u0441\u0442\u0430\u043b\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e:<\/p>\n<pre><code>backup:   barmanObjectStore:     destinationPath: \"s3:\/\/grafana-backup\/backups\" # \u041f\u0443\u0442\u044c \u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443.     endpointURL: \"https:\/\/s3.storage.foo.bar\" # \u0421\u0435\u0440\u0432\u0438\u0441 S3.  kubectl -n grafana get backups.postgresql.cnpg.io grafana-pg-backup-1655737200 -o yaml --- apiVersion: postgresql.cnpg.io\/v1 kind: Backup   [...] status:   phase: completed<\/code><\/pre>\n<h3>\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0414\u043b\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u0430 \u043f\u043e\u043b\u043d\u0430\u044f \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0430\u044f \u043a\u043e\u043f\u0438\u044f \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043d\u0435\u043b\u044c\u0437\u044f: \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 <em>Cluster<\/em> \u0441 \u0434\u0440\u0443\u0433\u0438\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 <code>metadata.name<\/code>.<\/p>\n<p>\u041f\u0440\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0432 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c PostgreSQL \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 <code>spec.bootstrap.recovery<\/code> \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 <em>Backup<\/em>:<\/p>\n<pre><code>kubectl -n grafana get backups.postgresql.cnpg.io # \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0431\u044d\u043a\u0430\u043f \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445. NAME                           AGE     CLUSTER      PHASE       ERROR [...] grafana-pg-backup-1657497600   5h28m   grafana-pg   completed  --- apiVersion: postgresql.cnpg.io\/v1 kind: Cluster metadata:   name: grafana-pg-restore spec:   [...]   bootstrap:     recovery:       backup:         name: grafana-pg-backup-1657497600<\/code><\/pre>\n<p>\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438\u043b\u0438 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0438\u0437 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430:<\/p>\n<pre><code class=\"yaml\">--- apiVersion: postgresql.cnpg.io\/v1 kind: Cluster metadata:   name: grafana-pg-restore # \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. spec:   [...]   bootstrap:     recovery: # \u041a\u043b\u0430\u0441\u0442\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u0438\u0437 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0439 \u043a\u043e\u043f\u0438\u0438.       source: grafana-pg       recoveryTarget:         targetTime: \"2022-07-01 15:22:00.00000+00\" # \u041c\u0435\u0442\u043a\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.   externalClusters: # \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f.     - name: grafana-pg # \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.       barmanObjectStore: # \u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0443.         destinationPath: \"s3:\/\/grafana-backup\/backups\"         endpointURL: \"https:\/\/s3.storage.foo.bar\"         s3Credentials:          accessKeyId:             name: s3-creds             key: accessKeyId           secretAccessKey:             name: s3-creds             key: secretAccessKey<\/code><\/pre>\n<p><strong>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435:<\/strong> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u043a\u0446\u0438\u0438 <code>name<\/code> \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <code>spec.externalClusters<\/code> \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430: \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0438\u0449\u0435\u0442 \u0430\u0440\u0445\u0438\u0432\u044b \u0441 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u043c\u0438 \u043a\u043e\u043f\u0438\u044f\u043c\u0438 \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. \u0422\u0430\u043a\u0436\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u043e\u0441\u044c \u0432 \u043e\u0434\u0438\u043d \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u2014 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0443\u0442 \u043d\u0435\u043f\u0440\u0438\u0433\u043e\u0434\u043d\u044b \u0434\u043b\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 PITR, \u043c\u0435\u0442\u043a\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>bootstrap.recovery.recoveryTarget.targetTime<\/code>. \u0415\u0441\u043b\u0438 \u0440\u0430\u0437\u0434\u0435\u043b <code>bootstrap.recovery.recoveryTarget<\/code> \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d, \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0434\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e \u0430\u0440\u0445\u0438\u0432\u0430 WAL.<\/p>\n<h3>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0438 \u0430\u043b\u0435\u0440\u0442\u044b<\/h3>\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u0432 Kubernetes \u0438\u043c\u0435\u0435\u0442\u0441\u044f kubectl-\u043f\u043b\u0430\u0433\u0438\u043d. \u0421 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u043e\u043b\u044f\u043c\u0438 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c\u0438, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 <code>reload<\/code> \u0438 <code>restart<\/code> \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c <em>maintenance<\/em>-\u0440\u0435\u0436\u0438\u043c, \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043e\u0442\u0447\u0435\u0442\u044b. \u0412\u043e\u0442 \u0442\u0430\u043a \u043f\u043b\u0430\u0433\u0438\u043d \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4d6\/9d8\/fbe\/4d69d8fbe95333408c5fb1c1b7fd8345.png\" width=\"1600\" height=\"848\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4d6\/9d8\/fbe\/4d69d8fbe95333408c5fb1c1b7fd8345.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438, \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432, \u0440\u043e\u043b\u044f\u0445, \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u0445, \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u043c \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438. \u041f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0441 \u043a\u043b\u044e\u0447\u0430\u043c\u0438 <code>--verbose<\/code> \u0438\u043b\u0438 <code>-v<\/code> \u0432\u044b\u0432\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 PostgreSQL.<\/p>\n<p>\u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440 \u043c\u0435\u0442\u0440\u0438\u043a, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u043f\u043e \u0438\u043c\u0435\u043d\u0438 <code>\/metrics<\/code> \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0440\u0442 9187. \u0414\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d <a href=\"https:\/\/github.com\/EnterpriseDB\/cnp-sandbox\/blob\/main\/charts\/cnp-sandbox\/dashboard.json\"><u>\u0434\u0430\u0448\u0431\u043e\u0440\u0434 Grafana<\/u><\/a>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/720\/6a6\/f63\/7206a6f6378faefcbc168b8d8d9b1f2b.png\" width=\"1600\" height=\"717\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/720\/6a6\/f63\/7206a6f6378faefcbc168b8d8d9b1f2b.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0435\u0442\u0440\u0438\u043a \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0430\u043b\u0435\u0440\u0442\u044b \u0434\u043b\u044f Alertmanager&#8217;\u0430 \u2014 \u0441\u043c. <a href=\"https:\/\/github.com\/EnterpriseDB\/cnp-sandbox\"><u>\u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 GitHub<\/u><\/a>.<\/p>\n<h3>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438<\/h3>\n<p>\u041c\u044b \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u0441\u0432\u043e\u0434\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0434\u043b\u044f Postgres-\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0432 Kubernetes <a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/527524\/\"><u>\u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438<\/u><\/a>:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\"><strong>Stolon<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\"><strong>Crunchy Data<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\"><strong>Zalando<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\"><strong>KubeDB<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\"><strong>StackGres<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>CloudNativePG<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">0.17.0<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">5.1.2<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">1.8.0<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">0.17<\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">1.2.0<\/p>\n<\/td>\n<td>\n<p align=\"left\">1.16.0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">\u0412\u0435\u0440\u0441\u0438\u0438 PostgreSQL<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">9.6-14<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">10-14<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">9.6-14<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">9.6-14<\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">12, 13<\/p>\n<\/td>\n<td>\n<p align=\"left\">10-14<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"6\" data-colwidth=\"131,73,96,86,83,97\" width=\"131\">\n<p><strong>\u041e\u0431\u0449\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">\u041a\u043b\u0430\u0441\u0442\u0435\u0440\u044b PgSQL<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">\u0422\u0435\u043f\u043b\u044b\u0439 \u0438 \u0433\u043e\u0440\u044f\u0447\u0438\u0439 \u0440\u0435\u0437\u0435\u0440\u0432<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">\u0421\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">\u041f\u043e\u0442\u043e\u043a\u043e\u0432\u0430\u044f \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 failover<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">\u041d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0435 \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f: \u0438\u0437 WAL-\u0430\u0440\u0445\u0438\u0432\u0430<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">\u0411\u044d\u043a\u0430\u043f\u044b: \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u044b\u0435, \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">\u2717<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">\u0411\u044d\u043a\u0430\u043f\u044b: \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u0438\u0437 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">\u2717<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">\u2717<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">\u2717<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u0437 \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u0430<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"6\" data-colwidth=\"131,73,96,86,83,97\" width=\"131\">\n<p><strong>\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 Prometheus<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">\u2717<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">\u2717<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">\u041a\u0430\u0441\u0442\u043e\u043c\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">\u041a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 Docker-\u043e\u0431\u0440\u0430\u0437<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">\u2717<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">\u2717<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">\u0412\u043d\u0435\u0448\u043d\u0438\u0435 CLI-\u0443\u0442\u0438\u043b\u0438\u0442\u044b<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">\u2717<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">\u2713<\/p>\n<p align=\"left\"><em>(kubectl-\u043f\u043b\u0430\u0433\u0438\u043d)<\/em><\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">\u2717<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2713<\/p>\n<p align=\"left\"><em>(kubectl-\u043f\u043b\u0430\u0433\u0438\u043d)<\/em><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 CRD<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">\u2717<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">\u041a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044f Pod&#8217;\u043e\u0432<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">\u2717<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">\u2717<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2713 \u0447\u0435\u0440\u0435\u0437 PodTemplateSpec<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">NodeSelector \u0438 NodeAffinity<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">\u2713<\/p>\n<p align=\"left\"><em>(\u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0442\u0447\u0438)<\/em><\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">Tolerations<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"left\">Pod anti-affinity<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"96\" width=\"96\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td data-colwidth=\"97\" width=\"97\">\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2713<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h3>\u0412\u044b\u0432\u043e\u0434\u044b<\/h3>\n<p>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0435 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u0435. \u0414\u0430\u0436\u0435 \u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438, \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0435\u0439. \u041d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c, \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438. \u0420\u0430\u0434\u0443\u044e\u0442 \u043c\u043d\u043e\u0433\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u0433\u0438\u0431\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 Kubernetes, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u0441 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u0430\u043c\u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438. \u0411\u044d\u043a\u0430\u043f\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438, \u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438.<\/p>\n<p>\u0421\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u0437\u0430 \u0431\u043e\u0440\u0442\u043e\u043c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u043c\u0430\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u044f\u0434 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u044e\u043d\u0438\u043d\u0433 PostgreSQL. \u0412\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 PgBouncer \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0443\u043b\u0430\u043c\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 <em>Pooler<\/em>. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043a\u0430\u043a \u0440\u0435\u043f\u043b\u0438\u043a\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435. \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0438 \u043f\u0440\u043e\u0434\u0443\u043c\u0430\u043d\u043d\u044b\u0439. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c!<\/p>\n<h3>P.S.<\/h3>\n<p>\u0427\u0438\u0442\u0430\u0439\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0432 \u043d\u0430\u0448\u0435\u043c \u0431\u043b\u043e\u0433\u0435:<\/p>\n<ul>\n<li>\n<p>\u00ab\u041e\u0431\u0437\u043e\u0440 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 PostgreSQL \u0434\u043b\u044f Kubernetes\u00bb: <a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/520616\/\"><u>\u0447\u0430\u0441\u0442\u044c 1 (\u043d\u0430\u0448 \u0432\u044b\u0431\u043e\u0440 \u0438 \u043e\u043f\u044b\u0442)<\/u><\/a>; <a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/527524\/\"><u>\u0447\u0430\u0441\u0442\u044c 2: (\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0438 \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435)<\/u><\/a>;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/568924\/\">\u00ab<u>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 PostgreSQL. \u0420\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0430 \u0430\u0443\u0434\u0438\u043e\u0447\u0430\u0442\u0430 Data Egret \u0438 Okmeter<\/u>\u00bb<\/a>;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/431500\/\">\u00ab<u>\u0411\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 Kubernetes (\u043e\u0431\u0437\u043e\u0440 \u0438 \u0432\u0438\u0434\u0435\u043e \u0434\u043e\u043a\u043b\u0430\u0434\u0430)<\/u>\u00bb<\/a>;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/479438\/\">\u00ab<u>Postgres-\u0432\u0442\u043e\u0440\u043d\u0438\u043a \u21165: PostgreSQL \u0438 Kubernetes. CI\/CD. \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/u>\u00bb<\/a>.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/684202\/\"> https:\/\/habr.com\/ru\/company\/flant\/blog\/684202\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0421\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u043d\u0430\u0448 \u043e\u0431\u0437\u043e\u0440\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u043e PostgreSQL-\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445 \u0434\u043b\u044f Kubernetes. <a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/520616\/\">\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b Stolon, Crunchy Data \u0438 Zalando. <a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/527524\/\">\u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439<\/a> \u2014 KubeDB \u0438 StackGres, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b\u0438 \u0432\u0441\u0435 \u043f\u044f\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0432 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443. \u0412 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437  \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 CloudNativePG, \u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0430 \u0437\u0430\u043e\u0434\u043d\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u0430\u043f\u0440\u0435\u043b\u044f 2022 \u0433\u043e\u0434\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f <a href=\"https:\/\/www.enterprisedb.com\/\"><u>EnterpriseDB<\/u><\/a> \u043f\u043e\u0434 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439 Apache License 2.0 \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0430 <a href=\"https:\/\/github.com\/cloudnative-pg\/cloudnative-pg\"><u>CloudNativePG<\/u><\/a> \u2014 Open Source-\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 PostgreSQL \u0434\u043b\u044f Kubernetes. \u042d\u0442\u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0445\u043e\u0440\u043e\u0448\u043e <a href=\"https:\/\/cloudnative-pg.io\/docs\/\"><u>\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d<\/u><\/a>, \u0433\u0438\u0431\u043e\u043a \u0438 \u0443\u0434\u043e\u0431\u0435\u043d \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438, \u0441 \u0448\u0438\u0440\u043e\u043a\u0438\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<h3>\u041d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b<\/h3>\n<p>\u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 CloudNativePG \u0432 Kubernetes \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 <a href=\"https:\/\/github.com\/cloudnative-pg\/cloudnative-pg\/tree\/main\/releases\"><u>\u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 YAML<\/u><\/a> \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435 \u043a \u043d\u0435\u043c\u0443 <code>kubectl apply<\/code>. \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u044b CustomResourceDefinition: <em>Cluster<\/em>, <em>Pooler<\/em>, <em>Backup<\/em> \u0438 <em>ScheduledBackup<\/em> \u2014 \u043e \u043d\u0438\u0445 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043d\u0438\u0436\u0435.<\/p>\n<p>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 <a href=\"https:\/\/hub.docker.com\/_\/postgres\"><u>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 PostgreSQL<\/u><\/a>. \u041f\u043e\u043c\u0438\u043c\u043e \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 Docker-\u043e\u0431\u0440\u0430\u0437\u043e\u0432 PostgreSQL \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <a href=\"https:\/\/cloudnative-pg.io\/documentation\/1.16\/container_images\/\"><em><u>Container Image Requirements<\/u><\/em><\/a> \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 <code>spec.bootstrap<\/code> \u0440\u0435\u0441\u0443\u0440\u0441\u0430 <em>Cluster<\/em>: <\/p>\n<ul>\n<li>\n<p>\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u2014 <code>initdb<\/code>; <\/p>\n<\/li>\n<li>\n<p>\u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0437 \u0431\u044d\u043a\u0430\u043f\u0430 \u2014 <code>recovery<\/code> (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 PITR, \u0438\u043b\u0438 <code>point-in-time recovery<\/code> \u2014 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438);<\/p>\n<\/li>\n<li>\n<p>\u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e PostgreSQL \u2014 <code>pg_basebackup<\/code> (\u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u043f\u0440\u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445).<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u0442\u0438\u043f\u043e\u0432\u043e\u0439 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 <em>grafana-pg<\/em> \u0438\u0437 \u0442\u0440\u0451\u0445 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 \u0441 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435:<\/p>\n<pre><code class=\"yaml\">--- apiVersion: postgresql.cnpg.io\/v1 kind: Cluster metadata:   name: grafana-pg # \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. spec:   instances: 3   primaryUpdateStrategy: unsupervised   storage:     storageClass: local     size: 1Gi   bootstrap:     initdb: # \u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.       database: grafana       owner: grafana       secret:         name: grafana-pg-user --- apiVersion: v1 kind: Secret # Secret \u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u0430\u043c\u0438 \u043a \u0411\u0414. metadata:   name: grafana-pg-user data:   username: {{ .Values.postgres.user | b64enc }}   password: {{ .Values.postgres.password | b64enc }} type: kubernetes.io\/basic-auth<\/code><\/pre>\n<p>\u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 Cloud Native, \u043a\u0430\u0436\u0434\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043b\u0443\u0447\u0448\u0435 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c PostgreSQL. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u043c <code>initdb<\/code> \u0432 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0443 \u0431\u0430\u0437\u0443. \u0423 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043c\u043d\u043e\u0433\u043e \u043f\u043b\u044e\u0441\u043e\u0432; \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043d\u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <a href=\"https:\/\/cloudnative-pg.io\/documentation\/1.16\/faq\/#database-management\"><em><u>Frequently Asked Questions (FAQ)<\/u><\/em><\/a> \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u0430\u0437\u044b \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u043e\u0434 \u0441\u0443\u043f\u0435\u0440\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c <code>postgres<\/code>. \u041b\u0438\u0431\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u0441\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u0438\u0445 \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 <code>spec.bootstrap.initdb.postInitSQL<\/code>.<\/p>\n<h3>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430, \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f, \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c<\/h3>\n<p>\u041e\u0434\u043d\u0430 \u0438\u0437 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u2014 \u043e\u0442\u043a\u0430\u0437 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Patroni \u0438\u043b\u0438 Stolon. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0432 \u043a\u0430\u0436\u0434\u044b\u0439 Pod \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b <code>\/controller\/manager<\/code>, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 <code>Instance Manager<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 Kubernetes API.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 PostgreSQL \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 (probes) \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438, \u043e\u043d \u043f\u043e\u043c\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0438\u0441\u043f\u0440\u0430\u0432\u043d\u044b\u043c, \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 <code>-ro<\/code> \u0438 <code>-r<\/code> \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f. \u0417\u0430\u0442\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441 master\u2019\u043e\u043c, \u0438 \u043f\u0440\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u0445 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0432\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u044e. \u041f\u0440\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0440\u043e\u043b\u044c master\u2019\u0430 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u043c\u0443 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e Pod\u2019\u044b \u0441 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430\u043c\u0438 \u0411\u0414, \u0430 \u043d\u0435 ReplicaSet \u0438\u043b\u0438 StatefulSet. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0431\u0435\u0441\u043f\u0435\u0440\u0435\u0431\u043e\u0439\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e Pod\u2019\u043e\u0432 \u0441 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c, \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432 \u0447\u0438\u0441\u043b\u043e \u0440\u0435\u043f\u043b\u0438\u043a \u0432<strong> <\/strong><code>deployment cnpg-controller-manager<\/code><strong>.<\/strong><\/p>\n<p>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e) \u0438 <a href=\"https:\/\/postgrespro.ru\/docs\/postgrespro\/14\/warm-standby#SYNCHRONOUS-REPLICATION\"><u>\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439<\/u><\/a> (\u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u0432\u043e\u0440\u0443\u043c\u0430) \u0442\u0438\u043f\u044b \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432. \u0427\u0438\u0441\u043b\u043e \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0440\u0435\u043f\u043b\u0438\u043a \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 <code>minSyncReplicas<\/code> \u0438 <code>maxSyncReplicas<\/code>.<\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e local storage \u043d\u0430 K8s-\u0443\u0437\u043b\u0430\u0445. \u041f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 Pod\u2019\u0430 \u0441 PostgreSQL \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u0430 \u0443\u0437\u043b\u0435 PVC \u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c PGDATA \u0438 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e, \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0432 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0435 WAL. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430 \u043d\u043e\u0432\u044b\u0439 \u0443\u0437\u0435\u043b PostgreSQL \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442 \u043f\u0443\u0442\u0451\u043c \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 master-\u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u043d\u0438\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 \u0441\u0435\u0442\u044c \u0438 \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0443\u0437\u043b\u043e\u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a PostgreSQL \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 (\u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430) \u043d\u0430\u0431\u043e\u0440 Service\u2019\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0435\u0436\u0438\u043c\u043e\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043f\u0438\u0441\u043e\u043a Service\u2019\u043e\u0432 \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 <em>grafana-pg<\/em>:<\/p>\n<ul>\n<li>\n<p><em>grafana-pg-rw<\/em> \u2014 \u0447\u0442\u0435\u043d\u0438\u0435\/\u0437\u0430\u043f\u0438\u0441\u044c \u0441 master-\u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430;<\/p>\n<\/li>\n<li>\n<p><em>grafana-pg-ro<\/em> \u2014 \u0447\u0442\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0440\u0435\u043f\u043b\u0438\u043a;<\/p>\n<\/li>\n<li>\n<p><em>grafana-pg-r<\/em> \u2014 \u0447\u0442\u0435\u043d\u0438\u0435 \u0441 \u043b\u044e\u0431\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 <em>grafana-pg-any<\/em> \u2014 \u043e\u043d \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0439 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d.<\/p>\n<h3>\u0413\u0438\u0431\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 Kubernetes<\/h3>\n<p>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0434\u0430\u0442\u044c \u0434\u043b\u044f Pod\u2019\u043e\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 <em>affinity<\/em>\/<em>anti-affinity<\/em>, <em>nodeSelector<\/em> \u0438 <em>tolerations<\/em>. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u043e\u0434\u0443\u043c\u0430\u043b\u0438 \u0437\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 <em>anti-affinity<\/em> \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u043d\u043e\u0441\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u044b \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 PostgreSQL \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0435 \u0443\u0437\u043b\u044b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 Kubernetes:<\/p>\n<pre><code class=\"yaml\"> affinity:     enablePodAntiAffinity: true # Default value.     topologyKey: kubernetes.io\/hostname # Default value.     podAntiAffinityType: preferred # Default value.<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u0440\u0430\u0432\u0438\u043b <em>affinity\/anti-affinity<\/em> \u0447\u0435\u0440\u0435\u0437 <code>additionalPodAntiAffinity<\/code> \u0438 <code>additionalPodAffinity<\/code>:<\/p>\n<pre><code class=\"yaml\">   additionalPodAntiAffinity:       requiredDuringSchedulingIgnoredDuringExecution:       - labelSelector:           matchExpressions:           - key: postgresql             operator: Exists             values: []         topologyKey: \"kubernetes.io\/hostname\"<\/code><\/pre>\n<h3>\u0420\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0411\u044d\u043a\u0430\u043f\u044b \u0432 CloudNativePG \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <a href=\"https:\/\/pgbarman.org\/\"><u>Barman<\/u><\/a> \u2014 \u043c\u043e\u0449\u043d\u043e\u0433\u043e Open Source-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f PostgreSQL.<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b AWS S3, Microsoft Azure Blob Storage \u0438 Google Cloud Storage, \u0430 \u0442\u0430\u043a\u0436\u0435 S3-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, MinIO \u0438 Linode. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u0441\u0436\u0430\u0442\u0438\u044f (gzip, bzip2, snappy) \u0438 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>\u0411\u044d\u043a\u0430\u043f\u044b \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 <code>spec.backup<\/code> \u0440\u0435\u0441\u0443\u0440\u0441\u0430 <em>Cluster<\/em>. \u041f\u0440\u0438\u0432\u0435\u0434\u0451\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 S3-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435:<\/p>\n<pre><code class=\"yaml\">backup:   retentionPolicy: \"30d\" # C\u0440\u043e\u043a \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u0430.   barmanObjectStore:     destinationPath: \"s3:\/\/grafana-backup\/backups\" # \u041f\u0443\u0442\u044c \u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443.     endpointURL: \"https:\/\/s3.storage.foo.bar\" # \u0421\u0435\u0440\u0432\u0438\u0441 S3.     s3Credentials: # \u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a bucket\u2019\u0443.       accessKeyId:         name: s3-creds         key: accessKeyId       secretAccessKey:         name: s3-creds         key: secretAccessKey     wal:       compression: gzip # \u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u0441\u0436\u0430\u0442\u0438\u0435 WAL.<\/code><\/pre>\n<p>\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0436\u0443\u0440\u043d\u0430\u043b\u043e\u0432 \u043f\u0440\u0435\u0434\u0437\u0430\u043f\u0438\u0441\u0438 WAL \u0441 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c \u0432 5 \u043c\u0438\u043d\u0443\u0442 \u043d\u0430\u0447\u043d\u0451\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430. \u0414\u043b\u044f \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u043d\u043e\u0439 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0439 \u043a\u043e\u043f\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0440\u0435\u0441\u0443\u0440\u0441 <em>Backup<\/em>. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0431\u044d\u043a\u0430\u043f \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>ScheduledBackup<\/code>:\u00a0<\/p>\n<pre><code class=\"yaml\">--- apiVersion: postgresql.cnpg.io\/v1 kind: ScheduledBackup metadata:   name: grafana-pg-backup spec:   immediate: true # \u0421\u0442\u0430\u0440\u0442 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0439 \u043a\u043e\u043f\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f ScheduledBackup.   schedule: \"0 0 0 * * *\"   cluster:     name: grafana-pg<\/code><\/pre>\n<p>\u041e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0444\u043e\u0440\u043c\u0430\u0442 \u0437\u0430\u043f\u0438\u0441\u0438 <code>spec.schedule<\/code> \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e <code>cron<\/code>, \u0438\u043c\u0435\u0435\u0442 6 \u043f\u043e\u043b\u0435\u0439 \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0441\u0435\u043a\u0443\u043d\u0434\u044b.<\/p>\n<p>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0430\u0440\u0445\u0438\u0432\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b\u0438 \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043f\u0440\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u043a \u0441\u0432\u0435\u0436\u0435\u043c\u0443 \u0431\u044d\u043a\u0430\u043f\u0443 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u0441\u044f WAL. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u00ab\u0440\u0443\u0447\u043d\u0430\u044f\u00bb \u043a\u043e\u043f\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0435\u0440\u0442\u0430 \u0438\u0437 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u043f\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u043e\u0439 <code>retentionPolicy<\/code> \u0441\u0440\u043e\u043a\u0430, \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/p>\n<p>\u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0433\u0440\u0430\u0431\u043b\u044f\u0445, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043d\u0430\u0441\u0442\u0443\u043f\u0438\u043b\u0438 \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0431\u044d\u043a\u0430\u043f\u043e\u0432.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0430 \u0431\u044b\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u043d\u044b\u0445 \u0430\u0440\u0445\u0438\u0432\u043e\u0432. \u041e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c, \u043d\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b, \u0447\u0442\u043e \u0431\u044d\u043a\u0430\u043f \u0432\u0441\u0451 \u0435\u0449\u0451 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f:<\/p>\n<pre><code>kubectl -n grafana get backups.postgresql.cnpg.io grafana-pg-backup-1655737200 -o yaml --- apiVersion: postgresql.cnpg.io\/v1 kind: Backup   [...] status:   phase: running<\/code><\/pre>\n<p>\u0421\u0442\u0430\u043b\u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0438 \u043f\u043e\u043d\u044f\u043b\u0438, \u0447\u0442\u043e <code>status.phase<\/code> \u043d\u0435\u0432\u0435\u0440\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e Barman \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 bucket S3. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 <code>endpointURL<\/code> \u0438 <code>destinationPath<\/code>. \u042d\u0442\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 S3-\u0441\u0435\u0440\u0432\u0438\u0441 \u0438 \u043f\u0443\u0442\u044c \u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0432 <a href=\"https:\/\/docs.aws.amazon.com\/AmazonS3\/latest\/userguide\/access-bucket-intro.html#virtual-host-style-url-ex\"><u>Virtual-hosted-style<\/u><\/a><u>&#8212;<\/u> \u0438 <a href=\"https:\/\/docs.aws.amazon.com\/AmazonS3\/latest\/userguide\/access-bucket-intro.html#path-style-url-ex\"><u>Path-style-\u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445<\/u><\/a>. \u0412 <a href=\"https:\/\/cloudnative-pg.io\/documentation\/1.16\/backup_recovery\/\"><u>\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0443<\/u><\/a> \u043d\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c \u0447\u0435\u0442\u043a\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f, \u043a\u0430\u043a\u043e\u0439 \u0438\u0437 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0441 \u043b\u0435\u0433\u043a\u043e\u0439 \u0440\u0443\u043a\u0438 \u0431\u044b\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u044b:<\/p>\n<pre><code class=\"yaml\">backup:   barmanObjectStore:     destinationPath: \"s3:\/\/backups\/\"     endpointURL: \"https:\/\/grafana-backup.s3.storage.foo.bar\"<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f <code>endpointURL<\/code> \u043a \u0444\u043e\u0440\u043c\u0430\u0442\u0443 <code>Path-style<\/code>, \u0430 <code>destinationPath<\/code> \u043a \u0432\u0438\u0434\u0443 <code>s3:\/\/BUCKET_NAME\/path\/to\/folder<\/code>, \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u043e\u0441\u044c \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>status.phase<\/code> \u0441\u0442\u0430\u043b\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e:<\/p>\n<pre><code>backup:   barmanObjectStore:     destinationPath: \"s3:\/\/grafana-backup\/backups\" # \u041f\u0443\u0442\u044c \u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443.     endpointURL: \"https:\/\/s3.storage.foo.bar\" # \u0421\u0435\u0440\u0432\u0438\u0441 S3.  kubectl -n grafana get backups.postgresql.cnpg.io grafana-pg-backup-1655737200 -o yaml --- apiVersion: postgresql.cnpg.io\/v1 kind: Backup   [...] status:   phase: completed<\/code><\/pre>\n<h3>\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0414\u043b\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u0430 \u043f\u043e\u043b\u043d\u0430\u044f \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0430\u044f \u043a\u043e\u043f\u0438\u044f \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043d\u0435\u043b\u044c\u0437\u044f: \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 <em>Cluster<\/em> \u0441 \u0434\u0440\u0443\u0433\u0438\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 <code>metadata.name<\/code>.<\/p>\n<p>\u041f\u0440\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0432 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c PostgreSQL \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 <code>spec.bootstrap.recovery<\/code> \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 <em>Backup<\/em>:<\/p>\n<pre><code>kubectl -n grafana get backups.postgresql.cnpg.io # \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0431\u044d\u043a\u0430\u043f \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445. NAME                           AGE     CLUSTER      PHASE       ERROR [...] grafana-pg-backup-1657497600   5h28m   grafana-pg   completed  --- apiVersion: postgresql.cnpg.io\/v1 kind: Cluster metadata:   name: grafana-pg-restore spec:   [...]   bootstrap:     recovery:       backup:   <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-338169","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/338169","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=338169"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/338169\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=338169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=338169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=338169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}