{"id":345247,"date":"2023-02-10T09:04:06","date_gmt":"2023-02-10T09:04:06","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=345247"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=345247","title":{"rendered":"<span>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 OpenShift \u0432 \u00ab\u0432\u0430\u043d\u0438\u043b\u044c\u043d\u044b\u0439\u00bb Kubernetes<\/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>OpenShift, Rancher \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0437\u0430\u0440\u0443\u0431\u0435\u0436\u043d\u044b\u0435 Kubernetes-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0420\u043e\u0441\u0441\u0438\u0438. \u041c\u043d\u043e\u0433\u0438\u043c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0441\u043a\u0430\u0442\u044c \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00ab\u0432\u0430\u043d\u0438\u043b\u044c\u043d\u044b\u0439\u00bb Kubernetes \u0438\u043b\u0438 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0438\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.<\/p>\n<p>\u0425\u043e\u0442\u044f \u0443 Kubernetes-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0430\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0431\u0430\u0437\u0430, \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0441 \u043e\u0434\u043d\u043e\u0439 \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u043e \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u0430 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0435\u0440\u0435\u0435\u0437\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 OpenShift \u0432 \u00ab\u0432\u0430\u043d\u0438\u043b\u044c\u043d\u044b\u0439\u00bb \u043a\u043b\u0430\u0441\u0442\u0435\u0440 Kubernetes. \u0412 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043e\u0432 OpenShift \u0438 Kubernetes \u2014 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 \u0438\u0437 \u044d\u0442\u0438\u0445 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043e\u0432 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0437\u0430\u043c\u0435\u043d\u044b, \u0430 \u043a\u0430\u043a\u0438\u0435 \u043d\u0435\u0442.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3fa\/b1f\/1a3\/3fab1f1a38a6950cd22886fd19b7432b.png\" width=\"1878\" height=\"1080\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3fa\/b1f\/1a3\/3fab1f1a38a6950cd22886fd19b7432b.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0415\u0441\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/konveyor.github.io\/move2kube\/\"><u>move2kube<\/u><\/a>. \u041e\u0434\u043d\u0430\u043a\u043e \u043e\u043d\u0438 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044f \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438. \u0417\u0434\u0435\u0441\u044c \u0436\u0435 \u043c\u044b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043c\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u00ab\u0440\u0443\u0447\u043d\u043e\u043c\u00bb \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h2>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c template OpenShift \u0441 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c:<\/p>\n<pre><code class=\"yaml\">apiVersion: template.openshift.io\/v1 kind: Template labels:   nginx: master metadata:   annotations:     description: example-template     iconClass: icon-nginx     tags: web,example   name: web-app-example objects: - apiVersion: apps\/v1   kind: Deployment   metadata:     name: ${NAME}   spec:     replicas: ${{REPLICAS}}     revisionHistoryLimit: 3     selector:       matchLabels:         app: ${NAME}     template:       metadata:         labels:           app: ${NAME}       spec:         containers:         - image: camunda\/camunda-bpm-platform:run-7.15.0           imagePullPolicy: Always           name: camunda           ports:           - containerPort: 8080             name: http             protocol: TCP           resources:             limits:               memory: ${BACK_MEMORY}             requests:               cpu: ${BACK_CPU}               memory: ${BACK_MEMORY}         - command:           - \/usr\/sbin\/nginx           - -g           - daemon off;           image: nginx:stable-alpine           imagePullPolicy: Always           lifecycle:             preStop:               exec:                 command:                 - \/bin\/bash                 - -c                 - sleep 5; kill -QUIT 1           name: nginx           ports:           - containerPort: 9000             name: http             protocol: TCP           resources:             limits:               memory: ${FRONT_MEMORY}             requests:               cpu: ${FRONT_CPU}               memory: ${FRONT_MEMORY}           volumeMounts:           - mountPath: \/etc\/nginx\/nginx.conf             name: configs             subPath: nginx.conf         volumes:         - configMap:             name: ${NAME}-config           name: configs - apiVersion: v1   kind: Service   metadata:     annotations:       description: Exposes and load balances the application pods     name: ${NAME}-service   spec:     ports:     - name: http       port: 9000       targetPort: 9000     selector:       app: ${NAME} - apiVersion: v1   kind: ConfigMap   metadata:     name: ${NAME}-config   data:     nginx.conf: |       user nginx;       worker_processes 1;       pid \/run\/nginx.pid;        events {         worker_connections 1024;       }        http {         include \/etc\/nginx\/mime.types;         default_type application\/octet-stream;          upstream backend {           server 127.0.0.1:8080 fail_timeout=0;         }          server {           listen 9000;           server_name _;            root \/www;            client_max_body_size 100M;           keepalive_timeout 10s;            location \/ {             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;             proxy_set_header X-Real-IP $remote_addr;             proxy_set_header X-Forwarded-Proto $scheme;             proxy_set_header Host $http_host;             proxy_redirect off;              proxy_pass http:\/\/backend;           }         }       }  - apiVersion: route.openshift.io\/v1   kind: Route   metadata:     name: ${NAME}-route   spec:     host: ${DOMAIN}.apps-crc.testing     port:       targetPort: http     to:       kind: Service       name: ${NAME}-service       weight: 100     wildcardPolicy: None parameters: - description: Name for application   from: '[A-Z]{8}'   generate: expression   name: NAME - description: Domain for application   from: '[A-Z]{8}'   generate: expression   name: DOMAIN - description: Number of replicas   from: '[0-9]{1}'   generate: expression   name: REPLICAS - description: Memory request and limit for frontend container   from: '[A-Z0-9]{4}'   generate: expression   name: FRONT_MEMORY - description: CPU request for frontend container   from: '[A-Z0-9]{3}'   generate: expression   name: FRONT_CPU - description: Memory request and limit for backend container   from: '[A-Z0-9]{4}'   generate: expression   name: BACK_MEMORY - description: CPU request for backend container   from: '[A-Z0-9]{3}'   generate: expression   name: BACK_CPU<\/code><\/pre>\n<p>\u0427\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u043e\u0433\u043e template:<\/p>\n<ul>\n<li>\n<p><strong>Deployment<\/strong> \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b nginx, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0432 \u0440\u043e\u043b\u0438 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0430, \u0438 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f stateless-\u0432\u0435\u0440\u0441\u0438\u044f <a href=\"https:\/\/github.com\/camunda\/docker-camunda-bpm-platform\"><u>camunda<\/u><\/a> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u044d\u043a\u0435\u043d\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>ConfigMap<\/strong> \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0434\u043b\u044f nginx, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u0439 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.<\/p>\n<\/li>\n<li>\n<p><strong>Route<\/strong> \u2014 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0434\u043e\u043c\u0435\u043d \u0441\u043d\u0430\u0440\u0443\u0436\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>Service<\/strong> \u2014 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a Pod&#8217;\u0430\u043c \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u044f\u0434\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a.<\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432 template, \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <code>values.env<\/code>:<\/p>\n<pre><code>NAME=example-application DOMAIN=example REPLICAS=1 FRONT_MEMORY=128Mi FRONT_CPU=50m BACK_MEMORY=512Mi BACK_CPU=50m<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u0434\u0435\u043b <code>parameters<\/code>.<\/p>\n<h2>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/h2>\n<p><em>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043b\u0435\u0436\u0438\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 Kubernetes. \u0414\u043b\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0430\u0441\u044c \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b <\/em><a href=\"https:\/\/deckhouse.ru\/\"><em><u>Deckhouse<\/u><\/em><\/a><em>.<\/em><\/p>\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0435\u0437\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 OpenShift \u0432 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e:<\/p>\n<ol>\n<li>\n<p>\u0412\u044b\u043d\u0435\u0441\u0442\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438\u0437 template \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 YAML-\u0444\u0430\u0439\u043b\u044b, \u0442\u0430\u043a \u043a\u0430\u043a template \u2014 \u044d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0439 \u0434\u043b\u044f OpenShift \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0430\u0446\u0438\u044e c \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0430\u0439\u043b\u0430 <code>values.yaml<\/code> \u0432\u043c\u0435\u0441\u0442\u043e <code>values.env<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c Route \u043d\u0430 Ingress-NGINX Controller.<\/p>\n<\/li>\n<\/ol>\n<p>Deployment, Service \u0438 ConfigMap \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0444\u0430\u0439\u043b \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c. \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <code>app.yaml<\/code>:<\/p>\n<pre><code class=\"yaml\">apiVersion: apps\/v1 kind: Deployment metadata:   name: {{ .Chart.Name }} spec:   replicas: {{ .Values.app.replicas }}   revisionHistoryLimit: 3   selector:     matchLabels:       app: {{ .Chart.Name }}   template:     metadata:       labels:         app: {{ .Chart.Name }}     spec:       containers:       - image: camunda\/camunda-bpm-platform:run-7.15.0         imagePullPolicy: Always         name: camunda         ports:         - containerPort: 8080           name: http           protocol: TCP         resources:           limits:             memory: {{ .Values.app.backend.memory }}           requests:             cpu: {{ .Values.app.backend.cpu }}             memory: {{ .Values.app.backend.memory }}       - command:         - \/usr\/sbin\/nginx         - -g         - daemon off;         image: nginx:stable-alpine         imagePullPolicy: Always         lifecycle:           preStop:             exec:               command:               - \/bin\/bash               - -c               - sleep 5; kill -QUIT 1         name: nginx         ports:         - containerPort: 9000           name: http           protocol: TCP         resources:           limits:             memory: {{ .Values.app.frontend.memory }}           requests:             cpu: {{ .Values.app.frontend.cpu }}             memory: {{ .Values.app.frontend.memory }}         volumeMounts:         - mountPath: \/etc\/nginx\/nginx.conf           name: configs           subPath: nginx.conf       volumes:       - configMap:           name: {{ .Chart.Name }}-config         name: configs<\/code><\/pre>\n<p>Service \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043c \u0432 \u0444\u0430\u0439\u043b\u0435 <code>service.yaml<\/code>:<\/p>\n<pre><code class=\"yaml\">apiVersion: v1 kind: Service metadata:   annotations:     description: Exposes and load balances the application pods   name: {{ .Chart.Name }} spec:   ports:   - name: http     port: 9000     targetPort: 9000   selector:     app: {{ .Chart.Name }}<\/code><\/pre>\n<p>ConfigMap \u2014 \u0432 \u0444\u0430\u0439\u043b\u0435 <code>configmap.yaml<\/code>:<\/p>\n<pre><code class=\"yaml\">apiVersion: v1 kind: ConfigMap metadata:   name: {{ .Chart.Name }}-config data:   nginx.conf: |     user nginx;     worker_processes 1;     pid \/run\/nginx.pid;      events {       worker_connections 1024;     }      http {       include \/etc\/nginx\/mime.types;       default_type application\/octet-stream;        upstream backend {         server 127.0.0.1:8080 fail_timeout=0;       }        server {         listen 9000;         server_name _;          root \/www;          client_max_body_size 100M;         keepalive_timeout 10s;          location \/ {           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;           proxy_set_header X-Real-IP $remote_addr;           proxy_set_header X-Forwarded-Proto $scheme;           proxy_set_header Host $http_host;           proxy_redirect off;            proxy_pass http:\/\/backend;         }       }     }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043c\u0435\u043d\u0438\u043c <code>values.env<\/code> \u043d\u0430 <code>values.yaml<\/code>:<\/p>\n<pre><code class=\"yaml\">app:   replicas: 1   host: example.kubernetes.testing   backend:     memory: 512Mi     cpu: 50m   frontend:     memory: 128Mi     cpu: 50m<\/code><\/pre>\n<p>Route \u2014\u00a0\u0442\u043e\u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442 OpenShift. \u0417\u0430\u043c\u0435\u043d\u0438\u043c \u0435\u0433\u043e \u043d\u0430 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 Ingress (\u0444\u0430\u0439\u043b <code>ingress.yaml<\/code>):<\/p>\n<pre><code class=\"yaml\">apiVersion: networking.k8s.io\/v1 kind: Ingress metadata:   annotations:     kubernetes.io\/ingress.class: nginx   name: {{ .Chart.Name }} spec:   rules:   - host: {{ .Values.app.host }}     http:       paths:       - path: \/         pathType: Prefix         backend:           service:             name: {{ .Chart.Name }}             port:               number: 9000<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u043e\u043a\u043e\u043d\u0447\u0435\u043d\u043d\u043e\u0439.\u00a0<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 Helm-\u0447\u0430\u0440\u0442 \u0433\u043e\u0442\u043e\u0432 \u043a \u0434\u0435\u043f\u043b\u043e\u044e \u0432 \u00ab\u0432\u0430\u043d\u0438\u043b\u044c\u043d\u044b\u0439\u00bb Kubernetes.\u00a0<\/p>\n<p><em>\u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f GitLab CI \u0438 <\/em><a href=\"https:\/\/ru.werf.io\/\"><em><u>werf<\/u><\/em><\/a><em>, \u043e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435. \u0427\u0430\u0440\u0442 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 \u043b\u044e\u0431\u044b\u043c\u0438 CI\/CD-\u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438.<\/em><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0434\u0435\u043f\u043b\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>werf converge<\/code>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c50\/2c9\/eb9\/c502c9eb91fc53bfdafd5c662d36a012.png\" width=\"920\" height=\"685\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c50\/2c9\/eb9\/c502c9eb91fc53bfdafd5c662d36a012.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fa6\/8a6\/7d8\/fa68a67d87e43dfcf1700345c5ec809d.png\" width=\"866\" height=\"192\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fa6\/8a6\/7d8\/fa68a67d87e43dfcf1700345c5ec809d.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/391\/73b\/50f\/39173b50ffd5773b0b799277de701ef3.png\" width=\"971\" height=\"583\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/391\/73b\/50f\/39173b50ffd5773b0b799277de701ef3.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e DeploymentConfig<\/h2>\n<p>\u0412 OpenShift \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0441\u0443\u0440\u0441 DeploymentConfig, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0430\u043a\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c. \u042d\u0442\u043e \u0432\u0435\u0440\u0441\u0438\u044f Deployment, \u00ab\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0430\u044f\u00bb \u0437\u0430 \u0441\u0447\u0435\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 ImageStream \u0438 BuildConfig: \u043e\u043d\u0438 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0438 \u0434\u0435\u043f\u043b\u043e\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440.\u00a0<\/p>\n<p>\u041f\u0440\u044f\u043c\u0430\u044f \u0437\u0430\u043c\u0435\u043d\u0430 DeploymentConfig \u043d\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u0432 \u00ab\u0432\u0430\u043d\u0438\u043b\u044c\u043d\u043e\u043c\u00bb Kubernetes \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0432\u044f\u0437\u043a\u0430 <em>DeploymentConfig + ImageStream + BuildConfig<\/em>, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 DeploymentConfig \u0432 Kubernetes, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 Deployment, \u0430 \u043d\u0435\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, CI-\u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439, \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u043c registry \u0434\u043b\u044f \u0438\u0445 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f.<\/p>\n<pre><code> selector:       name: ...<\/code><\/pre>\n<p>\u041d\u0438\u0436\u0435 \u2014 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0434\u043b\u044f \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f DeploymentConfig \u0432 Deployment. <\/p>\n<ol>\n<li>\n<p><code>apiVersion: apps.openshift.io\/v1<\/code> \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 <code>apiVersion: apps\/v1<\/code>.<\/p>\n<\/li>\n<li>\n<p><code>kind: DeploymentConfig<\/code> \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 <code>kind: Deployment<\/code>.<\/p>\n<\/li>\n<li>\n<p><code>spec.selectors<\/code> \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0441 <code>selector: name: ...<\/code> \u043d\u0430 <code>selector: matchLabels: name: ...<\/code><\/p>\n<\/li>\n<li>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0441\u0435\u043a\u0446\u0438\u044f <code>spec.template.spec.containers.image<\/code> \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0435\u043a\u0446\u0438\u0438 <code>spec.triggers<\/code>, <code>spec.strategy<\/code> \u0438 <code>spec.test<\/code>.<\/p>\n<\/li>\n<\/ol>\n<p><em>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u044d\u0442\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043d\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u0430. \u041a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f <\/em><a href=\"https:\/\/docs.openshift.com\/container-platform\/4.8\/applications\/deployments\/what-deployments-are.html\"><em><u>\u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u043f\u043e DeploymentConfig<\/u><\/em><\/a><em>.<\/em><\/p>\n<h2>\u041f\u043e\u0434\u044b\u0442\u043e\u0436\u0438\u043c<\/h2>\n<p>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 OpenShift \u0432 \u00ab\u0432\u0430\u043d\u0438\u043b\u044c\u043d\u044b\u0439\u00bb Kubernetes \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u0435\u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438 templates \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 YAML-\u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u043c\u0435\u043d\u044b \u0440\u044f\u0434\u0430 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0445 \u0434\u043b\u044f OpenShift \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 K8s.<\/p>\n<p>\u041d\u0438\u0436\u0435 \u2014 \u043a\u0440\u0430\u0442\u043a\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 OpenShift \u0438 K8s, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"343\" width=\"343\">\n<p align=\"center\"><strong>OpenShift<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>Kubernetes<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"343\" width=\"343\">\n<p align=\"left\">Template<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u0441\u044f \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 Helm chart<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"343\" width=\"343\">\n<p align=\"left\">DeploymentConfig<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041c\u0435\u043d\u044f\u0435\u043c \u043d\u0430 Deployment (\u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u044f \u043e\u0431 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 ImageStream \u0438 BuildConfig)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"343\" width=\"343\">\n<p align=\"left\">Route<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041c\u0435\u043d\u044f\u0435\u043c \u043d\u0430 Ingress<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"343\" width=\"343\">\n<p align=\"left\">Deployment\/Statefulset\/Daemonset<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 (\u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043c\u0435\u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0430\u0446\u0438\u0438)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"343\" width=\"343\">\n<p align=\"left\">Service\/ConfigMap \u0438 \u0442. \u0434.<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 (\u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043c\u0435\u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0430\u0446\u0438\u0438)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0439 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0435\u0440\u0435\u0435\u0437\u0434\u0430 \u0441 OpenShift \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c Deckhouse \u0430\u043a\u0442\u0443\u0430\u043b\u0435\u043d \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0434\u043b\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b (community edition). \u041c\u044b \u0443\u0436\u0435 \u043d\u0435 \u0440\u0430\u0437 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043b\u0438 \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430\u0448\u0438\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0441 OpenShift, Rancher \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0437\u0430\u0440\u0443\u0431\u0435\u0436\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u043d\u0430\u043a\u043e\u043f\u0438\u043b\u0438 \u043b\u0443\u0447\u0448\u0438\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 \u0438 <a href=\"https:\/\/deckhouse.ru\/services\/moving_from_openshift.html\"><u>\u0433\u043e\u0442\u043e\u0432\u044b \u043f\u043e\u043c\u043e\u0447\u044c \u0441 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0435\u0439 \u043d\u0430 Deckhouse<\/u><\/a>.<\/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>\n<p><a href=\"http:\/\/habr.com\/ru\/company\/flant\/blog\/568624\/\">\u00ab<u>\u041e\u043f\u044b\u0442 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438\u0437 AWS \u0432 \u042f\u043d\u0434\u0435\u043a\u0441.\u041e\u0431\u043b\u0430\u043a\u043e<\/u>\u00bb<\/a>;<\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/habr.com\/ru\/company\/flant\/blog\/498076\/\">\u00ab<u>\u041d\u0430\u0448 \u043e\u043f\u044b\u0442 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 Cassandra \u043c\u0435\u0436\u0434\u0443 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c\u0438 \u0431\u0435\u0437 \u043f\u043e\u0442\u0435\u0440\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/u>\u00bb<\/a>;<\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/habr.com\/ru\/company\/flant\/blog\/577808\/\">\u00ab<u>\u041e\u043f\u044b\u0442 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0438\u0437 Gitea \u0432 GitLab. \u0421\u043b\u043e\u0436\u043d\u043e, \u043d\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e<\/u>\u00bb<\/a>.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/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\/715908\/\"> https:\/\/habr.com\/ru\/company\/flant\/blog\/715908\/<\/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>OpenShift, Rancher \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0437\u0430\u0440\u0443\u0431\u0435\u0436\u043d\u044b\u0435 Kubernetes-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0420\u043e\u0441\u0441\u0438\u0438. \u041c\u043d\u043e\u0433\u0438\u043c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0441\u043a\u0430\u0442\u044c \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00ab\u0432\u0430\u043d\u0438\u043b\u044c\u043d\u044b\u0439\u00bb Kubernetes \u0438\u043b\u0438 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0438\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.<\/p>\n<p>\u0425\u043e\u0442\u044f \u0443 Kubernetes-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0430\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0431\u0430\u0437\u0430, \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0441 \u043e\u0434\u043d\u043e\u0439 \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u043e \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u0430 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0435\u0440\u0435\u0435\u0437\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 OpenShift \u0432 \u00ab\u0432\u0430\u043d\u0438\u043b\u044c\u043d\u044b\u0439\u00bb \u043a\u043b\u0430\u0441\u0442\u0435\u0440 Kubernetes. \u0412 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043e\u0432 OpenShift \u0438 Kubernetes \u2014 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 \u0438\u0437 \u044d\u0442\u0438\u0445 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043e\u0432 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0437\u0430\u043c\u0435\u043d\u044b, \u0430 \u043a\u0430\u043a\u0438\u0435 \u043d\u0435\u0442.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0415\u0441\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/konveyor.github.io\/move2kube\/\"><u>move2kube<\/u><\/a>. \u041e\u0434\u043d\u0430\u043a\u043e \u043e\u043d\u0438 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044f \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438. \u0417\u0434\u0435\u0441\u044c \u0436\u0435 \u043c\u044b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043c\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u00ab\u0440\u0443\u0447\u043d\u043e\u043c\u00bb \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h2>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c template OpenShift \u0441 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c:<\/p>\n<pre><code class=\"yaml\">apiVersion: template.openshift.io\/v1 kind: Template labels:   nginx: master metadata:   annotations:     description: example-template     iconClass: icon-nginx     tags: web,example   name: web-app-example objects: - apiVersion: apps\/v1   kind: Deployment   metadata:     name: ${NAME}   spec:     replicas: ${{REPLICAS}}     revisionHistoryLimit: 3     selector:       matchLabels:         app: ${NAME}     template:       metadata:         labels:           app: ${NAME}       spec:         containers:         - image: camunda\/camunda-bpm-platform:run-7.15.0           imagePullPolicy: Always           name: camunda           ports:           - containerPort: 8080             name: http             protocol: TCP           resources:             limits:               memory: ${BACK_MEMORY}             requests:               cpu: ${BACK_CPU}               memory: ${BACK_MEMORY}         - command:           - \/usr\/sbin\/nginx           - -g           - daemon off;           image: nginx:stable-alpine           imagePullPolicy: Always           lifecycle:             preStop:               exec:                 command:                 - \/bin\/bash                 - -c                 - sleep 5; kill -QUIT 1           name: nginx           ports:           - containerPort: 9000             name: http             protocol: TCP           resources:             limits:               memory: ${FRONT_MEMORY}             requests:               cpu: ${FRONT_CPU}               memory: ${FRONT_MEMORY}           volumeMounts:           - mountPath: \/etc\/nginx\/nginx.conf             name: configs             subPath: nginx.conf         volumes:         - configMap:             name: ${NAME}-config           name: configs - apiVersion: v1   kind: Service   metadata:     annotations:       description: Exposes and load balances the application pods     name: ${NAME}-service   spec:     ports:     - name: http       port: 9000       targetPort: 9000     selector:       app: ${NAME} - apiVersion: v1   kind: ConfigMap   metadata:     name: ${NAME}-config   data:     nginx.conf: |       user nginx;       worker_processes 1;       pid \/run\/nginx.pid;        events {         worker_connections 1024;       }        http {         include \/etc\/nginx\/mime.types;         default_type application\/octet-stream;          upstream backend {           server 127.0.0.1:8080 fail_timeout=0;         }          server {           listen 9000;           server_name _;            root \/www;            client_max_body_size 100M;           keepalive_timeout 10s;            location \/ {             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;             proxy_set_header X-Real-IP $remote_addr;             proxy_set_header X-Forwarded-Proto $scheme;             proxy_set_header Host $http_host;             proxy_redirect off;              proxy_pass http:\/\/backend;           }         }       }  - apiVersion: route.openshift.io\/v1   kind: Route   metadata:     name: ${NAME}-route   spec:     host: ${DOMAIN}.apps-crc.testing     port:       targetPort: http     to:       kind: Service       name: ${NAME}-service       weight: 100     wildcardPolicy: None parameters: - description: Name for application   from: '[A-Z]{8}'   generate: expression   name: NAME - description: Domain for application   from: '[A-Z]{8}'   generate: expression   name: DOMAIN - description: Number of replicas   from: '[0-9]{1}'   generate: expression   name: REPLICAS - description: Memory request and limit for frontend container   from: '[A-Z0-9]{4}'   generate: expression   name: FRONT_MEMORY - description: CPU request for frontend container   from: '[A-Z0-9]{3}'   generate: expression   name: FRONT_CPU - description: Memory request and limit for backend container   from: '[A-Z0-9]{4}'   generate: expression   name: BACK_MEMORY - description: CPU request for backend container   from: '[A-Z0-9]{3}'   generate: expression   name: BACK_CPU<\/code><\/pre>\n<p>\u0427\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u043e\u0433\u043e template:<\/p>\n<ul>\n<li>\n<p><strong>Deployment<\/strong> \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b nginx, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0432 \u0440\u043e\u043b\u0438 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0430, \u0438 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f stateless-\u0432\u0435\u0440\u0441\u0438\u044f <a href=\"https:\/\/github.com\/camunda\/docker-camunda-bpm-platform\"><u>camunda<\/u><\/a> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u044d\u043a\u0435\u043d\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>ConfigMap<\/strong> \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0434\u043b\u044f nginx, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u0439 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.<\/p>\n<\/li>\n<li>\n<p><strong>Route<\/strong> \u2014 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0434\u043e\u043c\u0435\u043d \u0441\u043d\u0430\u0440\u0443\u0436\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>Service<\/strong> \u2014 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a Pod&#8217;\u0430\u043c \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u044f\u0434\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a.<\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432 template, \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <code>values.env<\/code>:<\/p>\n<pre><code>NAME=example-application DOMAIN=example REPLICAS=1 FRONT_MEMORY=128Mi FRONT_CPU=50m BACK_MEMORY=512Mi BACK_CPU=50m<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u0434\u0435\u043b <code>parameters<\/code>.<\/p>\n<h2>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/h2>\n<p><em>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043b\u0435\u0436\u0438\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 Kubernetes. \u0414\u043b\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0430\u0441\u044c \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b <\/em><a href=\"https:\/\/deckhouse.ru\/\"><em><u>Deckhouse<\/u><\/em><\/a><em>.<\/em><\/p>\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0435\u0437\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 OpenShift \u0432 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e:<\/p>\n<ol>\n<li>\n<p>\u0412\u044b\u043d\u0435\u0441\u0442\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438\u0437 template \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 YAML-\u0444\u0430\u0439\u043b\u044b, \u0442\u0430\u043a \u043a\u0430\u043a template \u2014 \u044d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0439 \u0434\u043b\u044f OpenShift \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0430\u0446\u0438\u044e c \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0430\u0439\u043b\u0430 <code>values.yaml<\/code> \u0432\u043c\u0435\u0441\u0442\u043e <code>values.env<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c Route \u043d\u0430 Ingress-NGINX Controller.<\/p>\n<\/li>\n<\/ol>\n<p>Deployment, Service \u0438 ConfigMap \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0444\u0430\u0439\u043b \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c. \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <code>app.yaml<\/code>:<\/p>\n<pre><code class=\"yaml\">apiVersion: apps\/v1 kind: Deployment metadata:   name: {{ .Chart.Name }} spec:   replicas: {{ .Values.app.replicas }}   revisionHistoryLimit: 3   selector:     matchLabels:       app: {{ .Chart.Name }}   template:     metadata:       labels:         app: {{ .Chart.Name }}     spec:       containers:       - image: camunda\/camunda-bpm-platform:run-7.15.0         imagePullPolicy: Always         name: camunda         ports:         - containerPort: 8080           name: http           protocol: TCP         resources:           limits:             memory: {{ .Values.app.backend.memory }}           requests:             cpu: {{ .Values.app.backend.cpu }}             memory: {{ .Values.app.backend.memory }}       - command:         - \/usr\/sbin\/nginx         - -g         - daemon off;         image: nginx:stable-alpine         imagePullPolicy: Always         lifecycle:           preStop:             exec:               command:               - \/bin\/bash               - -c               - sleep 5; kill -QUIT 1         name: nginx         ports:         - containerPort: 9000           name: http           protocol: TCP         resources:           limits:             memory: {{ .Values.app.frontend.memory }}           requests:             cpu: {{ .Values.app.frontend.cpu }}             memory: {{ .Values.app.frontend.memory }}         volumeMounts:         - mountPath: \/etc\/nginx\/nginx.conf           name: configs           subPath: nginx.conf       volumes:       - configMap:           name: {{ .Chart.Name }}-config         name: configs<\/code><\/pre>\n<p>Service \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043c \u0432 \u0444\u0430\u0439\u043b\u0435 <code>service.yaml<\/code>:<\/p>\n<pre><code class=\"yaml\">apiVersion: v1 kind: Service metadata:   annotations:     description: Exposes and load balances the application pods   name: {{ .Chart.Name }} spec:   ports:   - name: http     port: 9000     targetPort: 9000   selector:     app: {{ .Chart.Name }}<\/code><\/pre>\n<p>ConfigMap \u2014 \u0432 \u0444\u0430\u0439\u043b\u0435 <code>configmap.yaml<\/code>:<\/p>\n<pre><code class=\"yaml\">apiVersion: v1 kind: ConfigMap metadata:   name: {{ .Chart.Name }}-config data:   nginx.conf: |     user nginx;     worker_processes 1;     pid \/run\/nginx.pid;      events {       worker_connections 1024;     }      http {       include \/etc\/nginx\/mime.types;       default_type application\/octet-stream;        upstream backend {         server 127.0.0.1:8080 fail_timeout=0;       }        server {         listen 9000;         server_name _;          root \/www;          client_max_body_size 100M;         keepalive_timeout 10s;          location \/ {           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;           proxy_set_header X-Real-IP $remote_addr;           proxy_set_header X-Forwarded-Proto $scheme;           proxy_set_header Host $http_host;           proxy_redirect off;            proxy_pass http:\/\/backend;         }       }     }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043c\u0435\u043d\u0438\u043c <code>values.env<\/code> \u043d\u0430 <code>values.yaml<\/code>:<\/p>\n<pre><code class=\"yaml\">app:   replicas: 1   host: example.kubernetes.testing   backend:     memory: 512Mi     cpu: 50m   frontend:     memory: 128Mi     cpu: 50m<\/code><\/pre>\n<p>Route \u2014\u00a0\u0442\u043e\u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442 OpenShift. \u0417\u0430\u043c\u0435\u043d\u0438\u043c \u0435\u0433\u043e \u043d\u0430 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 Ingress (\u0444\u0430\u0439\u043b <code>ingress.yaml<\/code>):<\/p>\n<pre><code class=\"yaml\">apiVersion: networking.k8s.io\/v1 kind: Ingress metadata:   annotations:     kubernetes.io\/ingress.class: nginx   name: {{ .Chart.Name }} spec:   rules:   - host: {{ .Values.app.host }}     http:       paths:       - path: \/         pathType: Prefix         backend:           service:             name: {{ .Chart.Name }}             port:               number: 9000<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u043e\u043a\u043e\u043d\u0447\u0435\u043d\u043d\u043e\u0439.\u00a0<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 Helm-\u0447\u0430\u0440\u0442 \u0433\u043e\u0442\u043e\u0432 \u043a \u0434\u0435\u043f\u043b\u043e\u044e \u0432 \u00ab\u0432\u0430\u043d\u0438\u043b\u044c\u043d\u044b\u0439\u00bb Kubernetes.\u00a0<\/p>\n<p><em>\u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f GitLab CI \u0438 <\/em><a href=\"https:\/\/ru.werf.io\/\"><em><u>werf<\/u><\/em><\/a><em>, \u043e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435. \u0427\u0430\u0440\u0442 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 \u043b\u044e\u0431\u044b\u043c\u0438 CI\/CD-\u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438.<\/em><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0434\u0435\u043f\u043b\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>werf converge<\/code>:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b<\/p>\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-345247","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/345247","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=345247"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/345247\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=345247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=345247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=345247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}