{"id":302690,"date":"2020-04-28T15:00:53","date_gmt":"2020-04-28T15:00:53","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=302690"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=302690","title":{"rendered":"ConfigMaps \u0432 Kubernetes: \u043d\u044e\u0430\u043d\u0441\u044b, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0442\u043e\u0438\u0442 \u0437\u043d\u0430\u0442\u044c"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/498970\/\"><i><b>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/b>: \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f-\u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e, \u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435\/\u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0443\u0436\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f ConfigMap \u0432 Kubernetes \u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0433\u043e\u0442\u043e\u0432\u0438\u0442 \u0441\u0432\u043e\u0451 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u043d\u0451\u043c.<\/i><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_h\/ly\/ln\/_hlylnaruzb2_b5zhbjpinrdphy.png\"><\/p>\n<h2>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f: \u043e\u0442 rsync \u043a\u2026 Kubernetes<\/h2>\n<p>  \u0427\u0442\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u043d\u044c\u0448\u0435? \u0412 \u044d\u043f\u043e\u0445\u0443 \u00ab\u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\u00bb \u0432 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u043b\u0438 \u043f\u0440\u044f\u043c\u043e \u0440\u044f\u0434\u043e\u043c \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 (\u0438\u043b\u0438 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u0435\u0441\u043b\u0438 \u0443\u0433\u043e\u0434\u043d\u043e). \u0412\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: \u0434\u0435\u043b\u0430\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u0443\u044e \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443 (CD) \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u043c. \u0414\u0430\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u0430 \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u043c rsync \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0437\u0430\u0447\u0430\u0442\u043a\u0430\u043c\u0438 CD.<a name=\"habracut\"><\/a><\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0432\u044b\u0440\u0430\u0441\u0442\u0430\u043b\u0430, \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0440\u0435\u0434 (dev\/stage\/production) \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0438. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0431\u0443\u0447\u0430\u043b\u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0441\u0440\u0435\u0434\u044b, \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438. \u0415\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 CD \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u0442\u043e\u043b\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 Chef\/Puppet\/Ansible. \u0423 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0440\u043e\u043b\u0438, \u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u044e\u0442 \u0431\u044b\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u2014 \u043c\u044b \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043c \u043a IaC (Infrastructure as code).<\/p>\n<p>  \u0427\u0442\u043e \u0437\u0430 \u044d\u0442\u0438\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e? \u0415\u0441\u043b\u0438 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 Kubernetes \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u043f\u043b\u044e\u0441\u044b \u0438 \u0434\u0430\u0436\u0435 \u0441\u043c\u0438\u0440\u0438\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u044d\u0442\u043e\u0439 \u0441\u0440\u0435\u0434\u0435, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u0430 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f. \u041f\u043e \u043f\u0443\u0442\u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043d\u044e\u0430\u043d\u0441\u043e\u0432 \u0438 \u043e\u0442\u043b\u0438\u0447\u0438\u0439 \u0432 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b, \u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0443\u0434\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f, \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u043b\u0433\u043e\u0436\u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0435 \u0432 K8s.<\/p>\n<p>  \u041e\u043a\u0430\u0437\u0430\u0432\u0448\u0438\u0441\u044c \u0437\u0434\u0435\u0441\u044c, \u043c\u044b \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0438, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0440\u044f\u0434\u043e\u043c \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f ENV \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u044d\u0442\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c \u0441\u0442\u0430\u043b\u0438 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b <a href=\"https:\/\/kubernetes.io\/docs\/tasks\/configure-pod-container\/configure-pod-configmap\/\">ConfigMaps<\/a>. \u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432 K8s \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Go templates \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0430\u0445, \u0442.\u0435. \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u044c \u0438\u0445 \u043f\u043e\u0434\u043e\u0431\u043d\u043e HTML-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c \u0438 \u0434\u0435\u043b\u0430\u0442\u044c reload \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0431\u0435\u0437 \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0430. \u0421 ConfigMaps \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0438 \u0434\u0435\u0440\u0436\u0430\u0442\u044c 3+ \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0439 \u0438 \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u043a\u0430\u0436\u0434\u043e\u0433\u043e.<\/p>\n<p>  \u041e\u0431\u0449\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e-\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u043e ConfigMaps \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/matthewpalmer.net\/kubernetes-app-developer\/articles\/ultimate-configmap-guide-kubernetes.html\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0410 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0441\u044c \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0438\u043c\u0438.<\/p>\n<h2>\u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0435 ConfigMap\u2019\u044b<\/h2>\n<p>  \u041a\u0430\u043a \u0436\u0435 \u0441\u0442\u0430\u043b\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0432 Kubernetes? \u0427\u0442\u043e \u043e\u043d\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043e\u0442 Go-\u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432? \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043e\u0442 \u0437\u0430\u0443\u0440\u044f\u0434\u043d\u044b\u0439 ConfigMap \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0438\u0437 Helm-\u0447\u0430\u0440\u0442\u0430:<\/p>\n<pre><code class=\"plaintext\">apiVersion: v1 kind: ConfigMap metadata:   name: app data:   config.json: |     {       &quot;welcome&quot;: {{ pluck .Values.global.env .Values.welcome | quote }},       &quot;name&quot;: {{ pluck .Values.global.env .Values.name | quote }}     }<\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u0432 <code>.Values.welcome<\/code> \u0438 <code>.Values.name<\/code>, \u0431\u0443\u0434\u0443\u0442 \u0432\u0437\u044f\u0442\u044b \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 <code>values.yaml<\/code>. \u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u0437 <code>values.yaml<\/code>? \u041a\u0430\u043a \u0432\u043e\u043e\u0431\u0449\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Go-\u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440? \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u0438\u0445 \u0434\u0435\u0442\u0430\u043b\u044f\u0445 \u043c\u044b \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/423239\/\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  \u0412\u044b\u0437\u043e\u0432 <code>pluck<\/code> \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438\u0437 map\u2019\u0430 \u043d\u0443\u0436\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<pre><code class=\"plaintext\">$ cat .helm\/values.yaml  welcome:   production: &quot;Hello&quot;   test: &quot;Hey&quot; name:   production: &quot;Bob&quot;   test: &quot;Mike&quot;<\/code><\/pre>\n<p>  \u041f\u0440\u0438\u0447\u0451\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u0440\u0430\u0442\u044c \u043a\u0430\u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u0442\u0430\u043a \u0438 \u0446\u0435\u043b\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0430.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, ConfigMap \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u0438\u043c:<\/p>\n<pre><code class=\"json\">data:   config.json: |     {{ pluck .Values.global.env .Values.data | first | toJson | indent 4 }}<\/code><\/pre>\n<p>  \u2026 \u0430 \u0432 <code>values.yaml<\/code> \u2014 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435:<\/p>\n<pre><code class=\"plaintext\">data:   production:     welcome: &quot;Hello&quot;     name: &quot;Bob&quot;<\/code><\/pre>\n<p>  \u0417\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0437\u0434\u0435\u0441\u044c <code>global.env<\/code> \u2014 \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u041f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0434\u0435\u043f\u043b\u043e\u0435, \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u044c ConfigMap\u2019\u044b \u0441 \u0440\u0430\u0437\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c. <code>first<\/code> \u0437\u0434\u0435\u0441\u044c \u043d\u0443\u0436\u0435\u043d, \u0442.\u043a. <code>pluck<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a, \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0443\u0436\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<h2>\u041a\u043e\u0433\u0434\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u043c\u043d\u043e\u0433\u043e<\/h2>\n<p>  \u041e\u0434\u0438\u043d ConfigMap \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u0444\u0438\u0433-\u0444\u0430\u0439\u043b\u043e\u0432:<\/p>\n<pre><code class=\"json\">data:   config.json: |     {       &quot;welcome&quot;: {{ pluck .Values.global.env .Values.welcome | first | quote }},       &quot;name&quot;: {{ pluck .Values.global.env .Values.name | first | quote }}     }   database.yml: |     host: 127.0.0.1     db: app     user: app     password: app<\/code><\/pre>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e:<\/p>\n<pre><code class=\"plaintext\">        volumeMounts:         - name: app-conf           mountPath: \/app\/configfiles\/config.json           subPath: config.json         - name: app-conf           mountPath: \/app\/configfiles\/database.yml           subPath: database.yml<\/code><\/pre>\n<p>  \u2026 \u0438\u043b\u0438 \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0441\u0440\u0430\u0437\u0443 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u043c:<\/p>\n<pre><code class=\"plaintext\">        volumeMounts:         - name: app-conf           mountPath: \/app\/configfiles<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u0440\u0438 \u0434\u0435\u043f\u043b\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 Deployment, \u0442\u043e Kubernetes \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043d\u043e\u0432\u044b\u0439 ReplicaSet, \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u044f \u0441\u0442\u0430\u0440\u044b\u0439 \u0434\u043e 0 \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u044f \u043d\u043e\u0432\u044b\u0439 \u0434\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0440\u0435\u043f\u043b\u0438\u043a. (\u042d\u0442\u043e \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0434\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0434\u0435\u043f\u043b\u043e\u044f <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/workloads\/controllers\/deployment\/#strategy\"><code>RollingUpdate<\/code><\/a>.)<\/p>\n<p>  \u0422\u0430\u043a\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443\u0442 \u043a \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e pod\u2019\u0430 \u0441 \u043d\u043e\u0432\u044b\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: \u0431\u044b\u043b \u043e\u0431\u0440\u0430\u0437 <code>image:my-registry.example.com:v1<\/code>, \u0430 \u0441\u0442\u0430\u043b \u2014 <code>image:my-registry.example.com:v2<\/code>. \u0418 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e Deployment\u2019\u0430: \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u0447\u0442\u043e \u044d\u0442\u043e \u0432\u044b\u0437\u0432\u0430\u043b\u043e \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 ReplicaSet (\u0438, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, pod\u2019\u0430). \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433-\u0444\u0430\u0439\u043b\u0430 \u0432 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<h2>\u0420\u0435\u0430\u043a\u0446\u0438\u044f \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 ConfigMap<\/h2>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 ConfigMap\u2019\u0430\u0445 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0447\u0435\u0442\u044b\u0440\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0445:<\/p>\n<ol>\n<li> <b>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435<\/b>: \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d ConfigMap, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u043e subPath.<br \/>  <b>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/b>: \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u0441\u0430\u043c.<\/li>\n<li> <b>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435<\/b>: \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d ConfigMap, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u0434\u0435\u043f\u043b\u043e\u044f \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043c\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0443\u0434\u0430\u043b\u0438\u043b\u0438 pod.<br \/>  <b>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/b>: \u043d\u043e\u0432\u044b\u0439 pod \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0441\u0430\u043c.<\/li>\n<li> <b>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435<\/b>: \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d ConfigMap \u0438 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0435\u0439 \u0432 Deployment \u043c\u044b \u0437\u0430\u0432\u044f\u0437\u0430\u043b\u0438\u0441\u044c \u043d\u0430 \u0435\u0433\u043e \u0445\u044d\u0448-\u0441\u0443\u043c\u043c\u0443.<br \/>  <b>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/b>: \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0432 ConfigMap\u2019\u0435, \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u0438 Deployment, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u0430\u0440\u044b\u0439 pod \u0431\u044b\u043b \u0443\u0434\u0430\u043b\u0451\u043d, \u0430 \u043d\u043e\u0432\u044b\u0439 \u2014 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0441 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0431\u0435\u0437 \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430.<\/li>\n<li> <b>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435<\/b>: \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d ConfigMap, \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u0430\u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433.<br \/>  <b>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/b>: \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0432 pod\u2019\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u0431\u0435\u0437 \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0430\/\u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f pod\u2019\u0430.<\/li>\n<\/ol>\n<p>  \u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.<\/p>\n<h3>\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 1<\/h3>\n<p>  \u041c\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u0438 <i>\u0442\u043e\u043b\u044c\u043a\u043e<\/i> ConfigMap? \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u043e <code>subPath<\/code> \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0434\u043e \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0430 pod\u2019\u0430.<\/p>\n<p>  \u0422\u0443\u0442 \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: Kubernetes \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0432 pod \u043d\u0430\u0448 ConfigMap \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0441 <code>subPath<\/code>, \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u00ab\u0432\u043b\u0438\u044f\u043d\u0438\u044f\u00bb \u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<h3>\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 2<\/h3>\n<p>  \u041d\u0435 \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f pod\u2019\u0430? \u041e\u043a\u0435\u0439, \u0443 \u043d\u0430\u0441 \u0432 Deployment\u2019\u0435 6 \u0440\u0435\u043f\u043b\u0438\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438, \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0435\u043c <code>delete pod<\/code>. \u0422\u043e\u0433\u0434\u0430 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u044b\u0445 pod\u2019\u043e\u0432 \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u00ab\u0437\u0430\u0431\u0438\u0440\u0430\u0442\u044c\u00bb \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e ConfigMap\u2019\u0430.<\/p>\n<h3>\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 3<\/h3>\n<p>  \u041d\u0430\u0434\u043e\u0435\u043b\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e? \u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043e\u043f\u0438\u0441\u0430\u043d \u0432 <a href=\"https:\/\/helm.sh\/docs\/howto\/charts_tips_and_tricks\/#automatically-roll-deployments\">Helm tips and tricks<\/a>:<\/p>\n<pre><code class=\"plaintext\">kind: Deployment spec:   template:     metadata:       annotations:         checksum\/config: {{ include (print $.Template.BasePath &quot;\/configmap.yaml&quot;) . | sha256sum }} [...]<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 \u0448\u0430\u0431\u043b\u043e\u043d pod\u2019\u0430 (<code>spec.template<\/code>) \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0445\u044d\u0448 \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0430.<\/p>\n<p>  \u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f key-value, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0445 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 <code>spec.template<\/code> \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e pod\u2019\u0430, \u044d\u0442\u0438 \u043f\u043e\u043b\u044f \u043f\u043e\u043f\u0430\u0434\u0443\u0442 \u0432 ReplicaSet \u0438 \u0441\u0430\u043c pod. Kubernetes \u0437\u0430\u043c\u0435\u0442\u0438\u0442, \u0447\u0442\u043e \u0448\u0430\u0431\u043b\u043e\u043d pod\u2019\u0430 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f (\u0442.\u043a. \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f sha256 \u043a\u043e\u043d\u0444\u0438\u0433\u0430) \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 <code>RollingUpdate<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0438\u0447\u0435\u0433\u043e \u043a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0439 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0442\u0443 \u0436\u0435 \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f Deployment\u2019\u0430 \u0438 \u043f\u043e \u0441\u0443\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0438\u043c \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 pod\u2019\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c \u2014 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u043c\u0443 \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u043b\u0438 \u0431\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0447\u0435\u0440\u0435\u0437 <code>kubectl delete<\/code>, \u043d\u043e \u0443\u0436\u0435 \u00ab\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u00bb: \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0438 \u0441 <code>RollingUpdate<\/code>.<\/p>\n<h3>\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 4<\/h3>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443\u0436\u0435 \u0443\u043c\u0435\u0435\u0442 \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c reload? \u0417\u0434\u0435\u0441\u044c \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u043d\u0435\u043c\u0430\u043b\u043e\u0432\u0430\u0436\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c ConfigMap\u2019\u043e\u0432\u2026<\/p>\n<p>  \u0412 Kubernetes, \u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0444\u0438\u0433 \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0441 <code>subPath<\/code>, \u043e\u043d \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0434\u043e \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0430 pod\u2019\u0430 <i>(\u0441\u043c. \u043f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435)<\/i>. \u041d\u043e \u0435\u0441\u043b\u0438 \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c ConfigMap \u043a\u0430\u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u0431\u0435\u0437 <code>subPath<\/code>, \u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0449\u0438\u043c\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u043c \u0431\u0435\u0437 \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0430 pod\u2019\u0430.<\/p>\n<p>  \u0415\u0441\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u043f\u0440\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c:<\/p>\n<ul>\n<li> \u0422\u0430\u043a\u043e\u0439 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u043e\u0439. \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435, \u0447\u0442\u043e \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0444\u0430\u0439\u043b, \u0430 \u043e\u0431\u044a\u0435\u043a\u0442 Kubernetes. <\/li>\n<li> \u0424\u0430\u0439\u043b \u0432\u043d\u0443\u0442\u0440\u0438 \u2014 \u044d\u0442\u043e \u0441\u0438\u043c\u043b\u0438\u043d\u043a. \u041f\u0440\u0438\u043c\u0435\u0440 \u0441 <code>subPath<\/code>:\n<pre><code class=\"bash\">$ kubectl -n production exec go-conf-example-6b4cb86569-22vqv -- ls -lha \/app\/configfiles  total 20K     drwxr-xr-x    1 root     root        4.0K Mar  3 19:34 . drwxr-xr-x    1 app      app         4.0K Mar  3 19:34 .. -rw-r--r--    1 root     root          42 Mar  3 19:34 config.json -rw-r--r--    1 root     root          47 Mar  3 19:34 database.yml<\/code><\/pre>\n<p>  \u0410 \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0431\u0435\u0437 <code>subPath<\/code>, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u043c?<\/p>\n<pre><code class=\"bash\">$ kubectl -n production exec go-conf-example-67c768c6fc-ccpwl -- ls -lha \/app\/configfiles  total 12K     drwxrwxrwx    3 root     root        4.0K Mar  3 19:40 . drwxr-xr-x    1 app      app         4.0K Mar  3 19:34 .. drwxr-xr-x    2 root     root        4.0K Mar  3 19:40 ..2020_03_03_16_40_36.675612011 lrwxrwxrwx    1 root     root          31 Mar  3 19:40 ..data -&gt; ..2020_03_03_16_40_36.675612011 lrwxrwxrwx    1 root     root          18 Mar  3 19:40 config.json -&gt; ..data\/config.json lrwxrwxrwx    1 root     root          19 Mar  3 19:40 database.yml -&gt; ..data\/database.yml<\/code><\/pre>\n<p>  \u041e\u0431\u043d\u043e\u0432\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433 (\u0447\u0435\u0440\u0435\u0437 \u0434\u0435\u043f\u043b\u043e\u0439 \u0438\u043b\u0438 <code>kubectl edit<\/code>), \u043f\u043e\u0434\u043e\u0436\u0434\u0435\u043c 2 \u043c\u0438\u043d\u0443\u0442\u044b (\u0432\u0440\u0435\u043c\u044f \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f apiserver) \u2014 \u0438 \u0432\u0443\u0430\u043b\u044f:<\/p>\n<pre><code class=\"bash\">$ kubectl -n production exec go-conf-example-67c768c6fc-ccpwl -- ls -lha --color \/app\/configfiles  total 12K     drwxrwxrwx    3 root     root        4.0K Mar  3 19:44 . drwxr-xr-x    1 app      app         4.0K Mar  3 19:34 .. drwxr-xr-x    2 root     root        4.0K Mar  3 19:44 ..2020_03_03_16_44_38.763148336 lrwxrwxrwx    1 root     root          31 Mar  3 19:44 ..data -&gt; ..2020_03_03_16_44_38.763148336 lrwxrwxrwx    1 root     root          18 Mar  3 19:40 config.json -&gt; ..data\/config.json lrwxrwxrwx    1 root     root          19 Mar  3 19:40 database.yml -&gt; ..data\/database.yml<\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0438\u0432\u0448\u0438\u0439\u0441\u044f timestamp \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c Kubernetes.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u041e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439<\/h2>\n<p>  \u0418 \u043d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0442\u0430\u043a\u0438\u043c Go-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"go\">package main  import ( \t&quot;encoding\/json&quot; \t&quot;fmt&quot; \t&quot;log&quot; \t&quot;os&quot; \t&quot;time&quot;  \t&quot;github.com\/fsnotify\/fsnotify&quot; )  \/\/ Config fo our application type Config struct { \tWelcome string `json:&quot;welcome&quot;` \tName    string `json:&quot;name&quot;` }  var ( \tglobalConfig *Config )  \/\/ LoadConfig - load our config! func LoadConfig(path string) (*Config, error) { \tconfigFile, err := os.Open(path)  \tif err != nil { \t\treturn nil, fmt.Errorf(&quot;Unable to read configuration file %s&quot;, path) \t}  \tconfig := new(Config)  \tdecoder := json.NewDecoder(configFile) \terr = decoder.Decode(&amp;config) \tif err != nil { \t\treturn nil, fmt.Errorf(&quot;Unable to parse configuration file %s&quot;, path) \t}  \treturn config, nil }  \/\/ ConfigWatcher - watches config.json for changes func ConfigWatcher() { \twatcher, err := fsnotify.NewWatcher() \tif err != nil { \t\tlog.Fatal(err) \t} \tdefer watcher.Close()  \tdone := make(chan bool) \tgo func() { \t\tfor { \t\t\tselect { \t\t\tcase event, ok := &lt;-watcher.Events: \t\t\t\tif !ok { \t\t\t\t\treturn \t\t\t\t} \t\t\t\tlog.Println(&quot;event:&quot;, event) \t\t\t\tif event.Op&amp;fsnotify.Write == fsnotify.Write { \t\t\t\t\tlog.Println(&quot;modified file:&quot;, event.Name) \t\t\t\t} \t\t\t\tglobalConfig, _ = LoadConfig(&quot;.\/configfiles\/config.json&quot;) \t\t\t\tlog.Println(&quot;config:&quot;, globalConfig) \t\t\tcase err, ok := &lt;-watcher.Errors: \t\t\t\tif !ok { \t\t\t\t\treturn \t\t\t\t} \t\t\t\tlog.Println(&quot;error:&quot;, err) \t\t\t} \t\t} \t}()  \terr = watcher.Add(&quot;.\/configfiles\/config.json&quot;) \tif err != nil { \t\tlog.Fatal(err) \t} \t&lt;-done }  func main() { \tlog.Println(&quot;Start&quot;) \tglobalConfig, _ = LoadConfig(&quot;.\/configfiles\/config.json&quot;) \tgo ConfigWatcher() \tfor { \t\tlog.Println(&quot;config:&quot;, globalConfig) \t\ttime.Sleep(30 * time.Second) \t} }<\/code><\/pre>\n<\/div><\/div>\n<p>  \u2026 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0432 \u0435\u0433\u043e \u0442\u0430\u043a\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u043c:<\/p>\n<pre><code class=\"json\">$ cat configfiles\/config.json  {   &quot;welcome&quot;: &quot;Hello&quot;,   &quot;name&quot;: &quot;Alice&quot; }<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c, \u0432 \u043b\u043e\u0433\u0435 \u0431\u0443\u0434\u0435\u0442:<\/p>\n<pre><code class=\"plaintext\">2020\/03\/03 22:18:22 config: &amp;{Hello Alice} 2020\/03\/03 22:18:52 config: &amp;{Hello Alice}<\/code><\/pre>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u043c \u044d\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 Kubernetes, \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0432 \u0432 pod \u043a\u043e\u043d\u0444\u0438\u0433 ConfigMap\u2019\u043e\u043c \u0432\u043c\u0435\u0441\u0442\u043e \u0444\u0430\u0439\u043b\u0430 \u0438\u0437 \u043e\u0431\u0440\u0430\u0437\u0430. \u041d\u0430 GitHub \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d <a href=\"https:\/\/github.com\/flant\/examples\/tree\/master\/2020\/04-configmaps\">\u043f\u0440\u0438\u043c\u0435\u0440 Helm-\u0447\u0430\u0440\u0442\u0430<\/a>:<\/p>\n<pre><code class=\"bash\">helm install -n habr-configmap --namespace habr-configmap .\/habr-configmap --set 'name.production=Alice' --set 'global.env=production'<\/code><\/pre>\n<p>  \u0418 \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e ConfigMap:<\/p>\n<pre><code class=\"bash\">-  production: &quot;Alice&quot; +  production: &quot;Bob&quot;<\/code><\/pre>\n<p>  \u041e\u0431\u043d\u043e\u0432\u0438\u043c Helm-\u0447\u0430\u0440\u0442 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">helm upgrade habr-configmap .\/habr-configmap --set 'name.production=Bob' --set 'global.env=production'<\/code><\/pre>\n<p>  \u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442?<\/p>\n<ul>\n<li> \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f v1 \u0438 v2 \u043d\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f, \u0442.\u043a. \u0434\u043b\u044f \u043d\u0438\u0445 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 Deployment\u2019\u0435 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u2014 \u043e\u043d\u0438 \u0432\u0441\u0435 \u0435\u0449\u0451 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 Alice.<\/li>\n<li> \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 v3 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u043e\u0441\u044c, \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u043b\u043e \u043a\u043e\u043d\u0444\u0438\u0433 \u0438 \u043f\u043e\u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e Bob\u2019\u0430.<\/li>\n<li> \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 v4 \u043d\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u043e\u0441\u044c. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 ConfigMap \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u043a\u0430\u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u0431\u044b\u043b\u0438 \u0437\u0430\u043c\u0435\u0447\u0435\u043d\u044b \u0438 \u043a\u043e\u043d\u0444\u0438\u0433 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u043d\u0430 \u043b\u0435\u0442\u0443, \u0431\u0435\u0437 \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0430 pod\u2019\u0430. \u0414\u0430, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u2014 \u0441\u043c. \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u043e\u0442 <a href=\"https:\/\/github.com\/fsnotify\/fsnotify\">fsnotify<\/a>:\n<pre><code class=\"plaintext\">2020\/03\/03 22:19:15 event: &quot;configfiles\/config.json&quot;: CHMOD 2020\/03\/03 22:19:15 config: &amp;{Hello Bob} 2020\/03\/03 22:19:22 config: &amp;{Hello Bob}<\/code><\/pre>\n<\/li>\n<\/ul>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0442\u043e, \u043a\u0430\u043a \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u2014 \u0441\u043b\u0435\u0436\u0435\u043d\u0438\u0435 \u0437\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c ConfigMap\u2019\u0430 \u2014 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0432 \u0431\u043e\u043b\u0435\u0435 \u0432\u0437\u0440\u043e\u0441\u043b\u043e\u043c (\u0434\u0430 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u00bb) \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/github.com\/coreos\/prometheus-operator\/blob\/release-0.14\/contrib\/prometheus-config-reloader\/main.go#L223-L252\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  <b>\u0412\u0430\u0436\u043d\u043e!<\/b> \u041f\u043e\u043b\u0435\u0437\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u0441\u0451 \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0438 \u0434\u043b\u044f Secret\u2019\u043e\u0432 \u0432 Kubernetes (<code>kind: Secret<\/code>): \u0432\u0435\u0434\u044c \u043d\u0435 \u0437\u0440\u044f \u043e\u043d\u0438 \u0442\u0430\u043a \u043f\u043e\u0445\u043e\u0436\u0438 \u043d\u0430 ConfigMap\u2026<\/p>\n<h2>\u0411\u043e\u043d\u0443\u0441! \u0421\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/h2>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0442\u0435\u043c\u0430 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0430\u0445, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b:<\/p>\n<ul>\n<li> <a href=\"https:\/\/github.com\/jimmidyson\/configmap-reload\">jimmidyson\/configmap-reload<\/a> \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441, \u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438 SIGHUP, \u043d\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0441 \u043e\u043a\u0442\u044f\u0431\u0440\u044f 2019 \u0433\u043e\u0434\u0430 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u044d\u0442\u0438 \u043f\u043b\u0430\u043d\u044b \u043f\u043e\u0434 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c;<\/li>\n<li> <a href=\"https:\/\/github.com\/stakater\/Reloader\">stakater\/Reloader<\/a> \u2014 \u0441\u043b\u0435\u0434\u0438\u0442 \u0437\u0430 ConfigMap\/Secrets \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 rolling upgrade (\u043a\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0430\u0432\u0442\u043e\u0440) \u043d\u0430\u0434 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u043d\u0438\u043c\u0438.<\/li>\n<\/ul>\n<p>  \u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c sidecar-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c. \u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0442\u044c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b Kubernetes\/ConfigMap \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u00ab\u043d\u0430 \u0436\u0438\u0432\u0443\u044e\u00bb (\u0447\u0435\u0440\u0435\u0437 <code>edit<\/code>), \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0435\u043f\u043b\u043e\u044f\u2026 \u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0442\u0430\u043a\u0438\u0445 \u0443\u0442\u0438\u043b\u0438\u0442 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043b\u0438\u0448\u043d\u0438\u043c\u0438, \u0442.\u0435. \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u043c\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0421 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435\u043c ConfigMap \u0432 Kubernetes \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u043f\u0435\u0440\u0435\u0448\u043b\u0438 \u043d\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0432\u0438\u0442\u043e\u043a \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043f\u0440\u0438\u043d\u0435\u0441\u043b\u043e \u0438\u043c \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c, \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u0443\u044e \u0441 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u043e\u043c HTML-\u0441\u0442\u0440\u0430\u043d\u0438\u0446. \u0411\u043b\u0430\u0433\u043e, \u0442\u0430\u043a\u0438\u0435 \u0443\u0441\u043b\u043e\u0436\u043d\u0435\u043d\u0438\u044f \u043d\u0435 <i>\u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0438<\/i> \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0430 \u0441\u0442\u0430\u043b\u0438 \u0438\u0445 <i>\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c<\/i>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432 (\u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u2014 \u0434\u0430\u0436\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0447\u0438\u0442\u0430\u044e\u0442 \u043d\u043e\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0437\u043b\u0438\u0448\u043d\u0438\u043c\u0438, \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0441\u0442\u0430\u0440\u044b\u0435 \u0434\u043e\u0431\u0440\u044b\u0435 \u0444\u0430\u0439\u043b\u044b.<\/p>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0445 \u0436\u0435, \u043a\u0442\u043e \u0443\u0436\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f ConfigMap\u2019\u0430\u043c\u0438 \u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a \u043d\u0438\u043c, \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0434\u0430\u043d \u043a\u0440\u0430\u0442\u043a\u0438\u0439 \u043e\u0431\u0437\u043e\u0440 \u0438\u0445 \u0441\u0443\u0442\u0438 \u0438 \u043d\u044e\u0430\u043d\u0441\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 tips &amp; tricks \u043f\u043e \u0442\u0435\u043c\u0435 \u2014 \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<h2>P.S.<\/h2>\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> \u00ab<a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/471582\/\">\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 Kubernetes<\/a>\u00bb;<\/li>\n<li> \u00ab<a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/423239\/\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0434\u043b\u044f Kubernetes \u0441 Helm: \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0447\u0430\u0440\u0442\u0430 \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f<\/a>\u00bb;<\/li>\n<li> \u00ab<a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/496936\/\">SSL-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u043e\u0442 Let&#8217;s Encrypt \u0441 cert-manager \u0432 Kubernetes<\/a>\u00bb.<\/li>\n<\/ul>\n<\/div>\n<p> \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\/498970\/\"> https:\/\/habr.com\/ru\/company\/flant\/blog\/498970\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/498970\/\"><i><b>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/b>: \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f-\u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e, \u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435\/\u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0443\u0436\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f ConfigMap \u0432 Kubernetes \u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0433\u043e\u0442\u043e\u0432\u0438\u0442 \u0441\u0432\u043e\u0451 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u043d\u0451\u043c.<\/i><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_h\/ly\/ln\/_hlylnaruzb2_b5zhbjpinrdphy.png\"><\/p>\n<h2>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f: \u043e\u0442 rsync \u043a\u2026 Kubernetes<\/h2>\n<p>  \u0427\u0442\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u043d\u044c\u0448\u0435? \u0412 \u044d\u043f\u043e\u0445\u0443 \u00ab\u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\u00bb \u0432 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u043b\u0438 \u043f\u0440\u044f\u043c\u043e \u0440\u044f\u0434\u043e\u043c \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 (\u0438\u043b\u0438 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u0435\u0441\u043b\u0438 \u0443\u0433\u043e\u0434\u043d\u043e). \u0412\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: \u0434\u0435\u043b\u0430\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u0443\u044e \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443 (CD) \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u043c. \u0414\u0430\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u0430 \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u043c rsync \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0437\u0430\u0447\u0430\u0442\u043a\u0430\u043c\u0438 CD.<\/p>\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-302690","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/302690","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=302690"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/302690\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=302690"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=302690"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=302690"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}