{"id":381941,"date":"2024-06-29T03:58:30","date_gmt":"2024-06-29T03:58:30","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=381941"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=381941","title":{"rendered":"<span>\u0423\u043b\u044c\u0442\u0438\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0433\u0430\u0439\u0434 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e CI\/CD \u0432 GitLab \u0441 \u0430\u0432\u0442\u043e\u0434\u0435\u043f\u043b\u043e\u0435\u043c \u0432 Kubernetes \u043d\u0430 \u0433\u043e\u043b\u043e\u043c \u0436\u0435\u043b\u0435\u0437\u0435 \u0432\u0441\u0435\u0433\u043e \u0437\u0430 514$ \u0432 \u0433\u043e\u0434 ( \u0361\u00b0 \u035c\u0296 \u0361\u00b0)<\/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<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/dd9\/7fd\/b3b\/dd97fdb3bb7dc37f60dc3c21c4ffd56a.jpg\" width=\"780\" height=\"458\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dd9\/7fd\/b3b\/dd97fdb3bb7dc37f60dc3c21c4ffd56a.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0428\u0435\u043b 2021 \u0433\u043e\u0434, \u0440\u0443\u0441\u0441\u043a\u0438\u0435 \u0445\u0430\u043a\u0435\u0440\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e\u0442 \u043f\u0435\u0440\u0435\u0438\u0433\u0440\u044b\u0432\u0430\u0442\u044c \u0438 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0442\u044c \u0437\u0430\u0433\u043d\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0417\u0430\u043f\u0430\u0434, \u0432\u043c\u0435\u0448\u0438\u0432\u0430\u044f\u0441\u044c \u0432 \u0432\u044b\u0431\u043e\u0440\u044b, \u043b\u043e\u043c\u0430\u044f \u0444\u0435\u0439\u0441\u0431\u0443\u043a\u0438 \u0438 \u043f\u0435\u043d\u0442\u0430\u0433\u043e\u043d\u044b. \u0422\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0432\u044b\u0445\u043e\u0434\u044f\u0442 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u0435\u0443\u0431\u0438\u0432\u0430\u0435\u043c\u044b\u0445 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u043f\u043e \u0432\u0438\u0434\u0438\u043c\u043e\u043c\u0443, \u0432\u0441\u0435\u0445 \u043d\u0430\u0441 \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0443\u0442. \u0410 \u043a\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u043e \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0430\u0446\u0430\u043d\u0430\u0445 (\u043f\u0430\u0446\u0430\u043d\u0435\u0441\u0441\u0430\u0445)??? \u041a\u0430\u043a \u0431\u044b\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0447\u0435\u0442 \u0441\u0432\u043e\u0439 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438 \u043b\u0430\u043c\u043f\u043e\u0432\u044b\u0439 CI\/CD \u0441 \u0430\u0432\u0442\u043e\u0434\u0435\u043f\u043b\u043e\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043a\u0435\u043d\u0442\u044b \u0441 \u0440\u0430\u0439\u043e\u043d\u0430 \u043d\u0435 \u0437\u0430\u0441\u043c\u0435\u044f\u043b\u0438?<\/p>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442, \u043c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043b\u0435\u043a\u0441\u0435\u0439 \u0438 \u044f <s>\u0430\u043b\u043a\u043e\u0433\u043e\u043b\u0438\u043a<\/s> \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430 Python\/Go \u0432 \u0414\u043e\u043c\u043a\u043b\u0438\u043a. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043d\u0438\u0436\u0430\u0442\u044c \u043f\u043e\u0440\u043e\u0433 \u0432\u0445\u043e\u0434\u0430 \u0432 self-hosted Kubernetes \u0438 GitLab AutoDevops.<\/p>\n<p>\u042d\u0442\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0438\u0437 \u0441\u0435\u0440\u0438\u0438 \u00ab\u0443\u043b\u044c\u0442\u0438\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u0445\u00bb. \u041c\u044b \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 \u0440\u0430\u043d\u044c\u0448\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442<a href=\"https:\/\/habr.com\/ru\/company\/domclick\/blog\/531254\/\"> \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/a> \u0437\u0434\u043e\u0440\u043e\u0432\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. \u0418\u043b\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/domclick\/blog\/532030\/\">\u0433\u0430\u0439\u0434 \u043f\u043e \u043f\u043e\u0438\u0441\u043a\u0443<\/a> \u0443\u0442\u0435\u0447\u0435\u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 Python. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u0435\u043b\u043e. <\/p>\n<p>\u0421\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u043b\u0430\u0432\u044b \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043a\u0430 <a href=\"#0\">\u2191<\/a>, \u043d\u0430\u0436\u0430\u0432 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u0442\u0435 \u043a \u043e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u044e. \u0422\u0435, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u0432\u0441\u0451 \u0438 \u0441\u0440\u0430\u0437\u0443 \u2014 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u0435 \u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0443 <strong>TL;DR<\/strong>, \u0442\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043a\u0440\u0430\u0442\u043a\u0430\u044f \u0432\u044b\u0436\u0438\u043c\u043a\u0430 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<hr\/>\n<p><a class=\"anchor\" name=\"0\" id=\"0\"><\/a><\/p>\n<h2>\u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/h2>\n<ol>\n<li>\n<p><a href=\"#%D0%92%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#1\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Kubernetes \u043d\u0430 \u0433\u043e\u043b\u043e\u0435 \u0436\u0435\u043b\u0435\u0437\u043e<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#1\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Kubernetes<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#2\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Helm<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#3\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Ingress-nginx<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#4\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Metallb<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#5\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 CI\/CD \u0432 Gitlab<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#5\">\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#6\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 GitLab<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#7\">\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#8\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 GitLab AutoDevops<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#9\">\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u043a\u0430\u043d\u0430\u0440\u0435\u0435\u0447\u043d\u044b\u0439 \u0434\u0435\u043f\u043b\u043e\u0439 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#10\">TL;DR<\/a><\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<p><a class=\"anchor\" name=\"%D0%92%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5\" id=\"\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435\"><\/a><\/p>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u0436\u0438\u0432\u043e\u0442\u0440\u0435\u043f\u0435\u0449\u0443\u0449\u0435\u0433\u043e \u2014 \u0441 \u0446\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u041e\u0442\u043a\u0443\u0434\u0430 \u0432\u0437\u044f\u043b\u0438\u0441\u044c \u044d\u0442\u0438 514$? <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u0432\u0430\u0441 \u0436\u0438\u0432\u0435\u0442 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0441\u0442\u0430\u0440\u0442\u0430\u043f\u0435\u0440, \u0442\u043e \u0432\u0430\u043c \u0440\u0430\u043d\u043e \u0438\u043b\u0438 \u043f\u043e\u0437\u0434\u043d\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0433\u0434\u0435-\u0442\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 production-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 (\u043d\u0435 \u0440\u0443\u043a\u0430\u043c\u0438 \u0436\u0435 \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u0432 2\u043a21?). \u041f\u043b\u0430\u0442\u0438\u0442\u044c \u0436\u0430\u0434\u043d\u044b\u043c \u0433\u0438\u0433\u0430\u043d\u0442\u0430\u043c \u043f\u043e \u0442\u0438\u043f\u0443 \u0433\u0443\u0433\u043b\u0430 \u0438\u043b\u0438 \u0430\u043c\u0430\u0437\u043e\u043d\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u0434\u0435\u043d\u044c\u0433\u0438 \u2014 \u044d\u0442\u043e \u0437\u0430\u0448\u043a\u0432\u0430\u0440. \u0414\u0435\u043d\u044f\u0445-\u0442\u043e \u043d\u0435\u0442, \u0432\u043e\u0442 \u043c\u044b \u0438 \u0434\u0435\u0440\u0436\u0438\u043c\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c CI\/CD \u0437\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043d\u0435 \u043f\u0435\u0440\u0435\u0433\u0438\u0431\u0430\u0442\u044c \u043f\u0430\u043b\u043a\u0443 \u0432 \u0447\u0440\u0435\u0437\u043c\u0435\u0440\u043d\u043e\u0439 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438. <\/p>\n<p>\u041a\u043b\u0430\u0441\u0442\u0435\u0440 \u0440\u0435\u0448\u0438\u043b \u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0443\u0437\u043b\u043e\u0432 \u2014 master \u0438 worker. \u041e\u0431\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0438\u043c\u0435\u044e\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e 2&#215;2,2 \u0413\u0413\u0446, 4 \u0413\u0431 RAM, 40 \u0413\u0431 SSD. \u0410\u0440\u0435\u043d\u0434\u0430 \u043e\u0434\u043d\u043e\u0439 \u0432 \u043c\u0435\u0441\u044f\u0446 ~ 12$. \u0412 \u0433\u043e\u0434 \u0437\u0430 \u0434\u0432\u0435 \u043c\u0430\u0448\u0438\u043d\u044b ~ 278$. \u041f\u043b\u0430\u0442\u0438\u043b \u0432 \u0440\u0443\u0431\u043b\u044f\u0445, \u043f\u0435\u0440\u0435\u0432\u0435\u043b \u0432 \u0434\u043e\u043b\u043b\u0430\u0440\u044b \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432 (\u043a\u0443\u0440\u0441 72 \u0440).<\/p>\n<p>CI\/CD \u0440\u0435\u0448\u0438\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432 GitLab (\u043b\u0435\u0436\u0438\u0442 \u043a \u043d\u0435\u043c\u0443 \u0434\u0443\u0448\u0430). \u0418 \u043a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432. \u0415\u0449\u0435 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0433\u043e\u0434\u0430 \u0431\u044b\u043b silver-\u0430\u043a\u043a\u0430\u0443\u043d\u0442, \u0441 \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043d\u0435\u0435 \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0446\u0435\u043d\u0430\u043c\u0438 ~ 9$ \u0432 \u043c\u0435\u0441\u044f\u0446. \u041d\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0435\u0433\u043e \u0443\u043f\u0440\u0430\u0437\u0434\u043d\u0438\u043b\u0438 \u0438 \u043d\u0430 \u0435\u0433\u043e \u043c\u0435\u0441\u0442\u043e \u043f\u0440\u0438\u0448\u0435\u043b premium \u0437\u0430 19$ \u0432 \u043c\u0435\u0441\u044f\u0446 \u0438\u043b\u0438 228$ \u0432 \u0433\u043e\u0434. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0442\u0430\u043c \u043c\u043d\u043e\u0433\u043e \u043f\u043b\u044e\u0448\u0435\u043a \u0442\u0438\u043f\u0430 \u043e\u0432\u0435\u0440-\u0434\u043e\u0444\u0438\u0433\u0430 CI-\u043c\u0438\u043d\u0443\u0442, \u043a\u0430\u043d\u0430\u0440\u0435\u0435\u0447\u043d\u044b\u0439 \u0434\u0435\u043f\u043b\u043e\u0439, \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u0434\u0430\u0448\u0431\u043e\u0440\u0434 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0439 \u041a\u0443\u0431\u0430 \u0438 \u0442.\u0434., \u043d\u043e \u0446\u0435\u043d\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043a\u0443\u0441\u0430\u0447\u0430\u044f.<\/p>\n<p>\u0422\u0440\u0435\u0442\u044c\u044f \u0441\u0442\u0430\u0442\u044c\u044f, \u0441\u0430\u043c\u0430\u044f \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u2014 \u043f\u043e\u043a\u0443\u043f\u043a\u0430 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438. \u041c\u043d\u0435 \u043e\u0431\u043e\u0448\u043b\u043e\u0441\u044c \u0432 8$ \u0437\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0433\u043e\u0434 (\u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0430\u043c \u0432\u0440\u043e\u0434\u0435 \u0432 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u0435\u0440\u0443\u0442).<\/p>\n<p>\u0418\u0442\u043e\u0433\u043e: 278$ + 228$ + 8$ = 514$.<\/p>\n<p>\u0410 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043a\u0443\u043f\u0438\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d VPS \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0443\u0434\u0430 GitLab? \u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f <a href=\"https:\/\/docs.gitlab.com\/ee\/install\/requirements.html#memory\">\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442<\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u0443 \u0441 \u0434\u0432\u0443\u043c\u044f \u044f\u0434\u0440\u0430\u043c\u0438 \u0438 4 \u0413\u0431 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u044b. \u0415\u0441\u043b\u0438 \u0431\u0440\u0430\u0442\u044c VPS \u0443 \u0442\u043e\u0433\u043e \u0436\u0435 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430, \u0442\u043e \u0432\u044b\u0439\u0434\u0435\u0442 12$ \u0432 \u043c\u0435\u0441\u044f\u0446, \u0430 \u0432 \u0433\u043e\u0434 \u2014 144$. \u042d\u043a\u043e\u043d\u043e\u043c\u0438\u044f \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 84$ \u0437\u0430 \u0433\u043e\u0434. \u041d\u043e \u0442\u0443\u0442 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u0431\u043e\u0442\u0430 \u043e\u0431 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435, \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 GitLab. \u0418 \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430. \u0417\u043d\u0430\u0442\u043e\u043a\u0438 self-managed GitLab, \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u0435\u043d\u0442\u044b. <\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0435 \u0437\u0430\u043c\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u0441\u0432\u043e\u0435\u0433\u043e GitLab \u0438 \u0432\u0435\u0441\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b \u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0437\u0430 514$. \u041d\u043e \u0432\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0443 \u0434\u043d\u0435\u0439 \u043d\u0430\u0437\u0430\u0434, \u043d\u0435\u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044b\u0439 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u043c \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u043c \u0443\u0441\u043b\u0443\u0433, \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0433\u0443\u0433\u043b\u0438\u0442\u044c \u0432 \u043d\u0430\u0434\u0435\u0436\u0434\u0435 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0448\u0435\u0432\u044b\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b. \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u044b \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0435\u0448\u0435\u0432\u043b\u0435, \u0442\u0430\u043a \u0435\u0449\u0451 \u0438 \u043c\u043e\u0449\u043d\u0435\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0432 \u0430\u0440\u0435\u043d\u0434\u0443 VPS [3&#215;2,8 \u0413\u0413\u0446, 5 \u0413\u0431 RAM, 60 \u0413\u0431 SSD] \u0437\u0430 9$ \u0438 [2&#215;2,8 \u0413\u0413\u0446, 2 \u0413\u0431 RAM, 40 \u0413\u0431 SSD] \u0437\u0430 6$ \u0432 \u043c\u0435\u0441\u044f\u0446. \u0417\u0430 \u0433\u043e\u0434 \u0432\u044b\u0439\u0434\u0435\u0442: (9$ + 6$) * 12 + 228$ + 8$ = 416$. \u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u0430\u0440\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u044b \u0438\u043c\u0435\u043d\u043d\u043e \u0443 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430.<\/p>\n<p>\u0412\u044b\u0432\u043e\u0434: \u0435\u0441\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c\u0441\u044f \u0446\u0435\u043b\u044c\u044e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c, \u0442\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043d\u0430\u0439\u0434\u0443\u0442\u0441\u044f. \u0410 \u043d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u043e\u043a\u043e\u043d\u0447\u0435\u043d\u043e. \u0414\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u043b\u0433\u043e, \u043d\u0443\u0434\u043d\u043e \u0438 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0434\u0430\u0436\u0435 \u0447\u0435\u0440\u0435\u0441\u0447\u0443\u0440 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e; \u0434\u0443\u043c\u0430\u044e, \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0447\u0442\u0443\u0442 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0434\u0432\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430: \u044f \u0438 \u043d\u0430\u0448 \u0448\u0435\u0444-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0431\u043b\u043e\u0433\u0430 (\u0437\u0430 \u0447\u0442\u043e \u0435\u043c\u0443 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e!). <a href=\"#0\">\u2191<\/a><\/p>\n<p><a class=\"anchor\" name=\"1\" id=\"1\"><\/a><\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Kubernetes \u043d\u0430 \u0433\u043e\u043b\u043e\u0435 \u0436\u0435\u043b\u0435\u0437\u043e<\/h2>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Kubernetes<\/h3>\n<p>\u0412\u0430\u043c \u043b\u0435\u0433\u043a\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043e \u044d\u0442\u043e\u0439 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 <a href=\"https:\/\/www.reg.ru\/support\/vps-servery\/oblachnie-serveri-vps\/ustanovka-programmnogo-obespechenija\/kubernetes\">\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438<\/a>. \u041d\u043e \u0432 \u043d\u0435\u0439 \u0435\u0441\u0442\u044c \u0440\u044f\u0434 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 Kubernetes \u043d\u0430 Ubuntu 20.04 LTS<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u044d\u0442\u0430\u043f\u044b \u0438 \u043f\u0443\u043d\u043a\u0442\u044b. \u0417\u0434\u0435\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0442\u0435 \u043f\u0443\u043d\u043a\u0442\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430.<\/p>\n<h3>\u042d\u0442\u0430\u043f 1. \u041f\u0443\u043d\u043a\u0442 4.<\/h3>\n<pre><code class=\"bash\">sudo systemctl enable docker<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u044d\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0431\u0443\u0434\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/804\/10f\/ad9\/80410fad9beda70d7dadfac5662de297.png\" width=\"1368\" height=\"80\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/804\/10f\/ad9\/80410fad9beda70d7dadfac5662de297.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <em>\/etc\/hosts<\/em>:<\/p>\n<pre><code class=\"bash\">nano \/etc\/hosts<\/code><\/pre>\n<p>\u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u0445\u043e\u0441\u0442 <em>ruvds-2p1sn<\/em>, \u043c\u043d\u0435 \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c:<\/p>\n<pre><code>127.0.0.1 ruvds-2p1sn<\/code><\/pre>\n<p>\u0410 \u0442\u0430\u043a\u0436\u0435 \u0432 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0438\u043c\u044f (\u044d\u0442\u043e \u0434\u043b\u044f master-\u043d\u043e\u0434\u044b; \u043a\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u0434\u043b\u044f worker-\u043d\u043e\u0434\u044b, \u0442\u043e \u0432\u0432\u0435\u0434\u0438\u0442\u0435 <code>kubernetes-worker<\/code>)<\/p>\n<pre><code>127.0.0.1 kubernetes-master<\/code><\/pre>\n<p>\u0423 \u043c\u0435\u043d\u044f \u0444\u0430\u0439\u043b \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/576\/40a\/542\/57640a542728589bc045af3e85cf0da6.png\" width=\"1026\" height=\"330\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/576\/40a\/542\/57640a542728589bc045af3e85cf0da6.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u043c. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>sudo systemctl enable docker<\/code><\/pre>\n<h3>\u042d\u0442\u0430\u043f 2. \u041f\u0443\u043d\u043a\u0442 1.<\/h3>\n<pre><code class=\"bash\">curl -s https:\/\/packages.cloud.google.com\/apt\/doc\/apt-key.gpg | sudo apt-key add<\/code><\/pre>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u043e\u0448\u0438\u0431\u043a\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/31a\/98f\/e69\/31a98fe6919959b34a12496a29bdf5a1.png\" width=\"1942\" height=\"226\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/31a\/98f\/e69\/31a98fe6919959b34a12496a29bdf5a1.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <em>curl<\/em>. \u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435:<\/p>\n<pre><code>apt install curl<\/code><\/pre>\n<p>\u041f\u043e\u0442\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0442\u0430\u043a\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>apt-get update &amp;&amp; apt-get install -y gnupg2<\/code><\/pre>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e. \u0422\u0435\u043f\u0435\u0440\u044c \u0443\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0438\u0437 \u043f\u0443\u043d\u043a\u0442\u0430 1 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u044d\u0442\u0430\u043f\u0430.<\/p>\n<h3>\u042d\u0442\u0430\u043f 2. \u041f\u0443\u043d\u043a\u0442 2.<\/h3>\n<pre><code>sudo apt-add-repository \"deb http:\/\/apt.kubernetes.io\/ kubernetes-xenial main\"<\/code><\/pre>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u043e\u0448\u0438\u0431\u043a\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/91e\/9df\/d43\/91e9dfd438b388a7b377f62922535793.png\" width=\"1746\" height=\"71\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/91e\/9df\/d43\/91e9dfd438b388a7b377f62922535793.png\"\/><figcaption><\/figcaption><\/figure>\n<pre><code class=\"bash\">sudo apt-get install software-properties-common<\/code><\/pre>\n<p>\u0418 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0439\u0442\u0435\u0441\u044c \u043a \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u043f\u0443\u043d\u043a\u0442\u0430 2.<\/p>\n<h3>\u042d\u0442\u0430\u043f 2. \u041f\u0443\u043d\u043a\u0442 3.<\/h3>\n<p>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043b\u0435\u0433\u043a\u043e \u0433\u0443\u0433\u043b\u044f\u0442\u0441\u044f \u0438 \u0440\u0435\u0448\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439. \u0410 \u0432\u043e\u0442 \u0441 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u0435\u0435:<\/p>\n<pre><code class=\"bash\">sudo apt install kubeadm kubelet kubectl<\/code><\/pre>\n<p>\u0415\u0449\u0435 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0433\u043e\u0434\u0430 \u0441 \u043d\u0435\u0439 \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u041d\u043e \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u044d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 master-\u043d\u043e\u0434\u044b \u043d\u0430 <strong>\u044d\u0442\u0430\u043f\u0435 3 \u043f\u0443\u043d\u043a\u0442 4<\/strong>. \u0427\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c? \u0412\u044b\u0448\u043b\u0430 \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u2014 <strong>1.22.2.<\/strong> \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0436\u0435 \u0433\u043e\u0434\u0430 \u044f \u0441\u0442\u0430\u0432\u0438\u043b \u0432\u0435\u0440\u0441\u0438\u044e <strong>1.20.2<\/strong> \u0438 \u0432\u0441\u0451 \u0431\u044b\u043b\u043e \u0445\u043e\u0440\u043e\u0448\u043e. \u041f\u0440\u0438\u0447\u0438\u043d\u0443 \u0441\u0431\u043e\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044f \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u0430\u0445 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u043d\u0435 \u043d\u0430\u0448\u0435\u043b. \u041f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0443\u0442\u0438\u043b\u0438\u0442. \u0410 \u043c\u044b \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c:<\/p>\n<pre><code class=\"bash\">sudo apt install kubeadm=1.20.2-00 kubelet=1.20.2-00 kubectl=1.20.2-00<\/code><\/pre>\n<p>\u0412\u0430\u043c \u0436\u0435 \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 (\u0435\u0441\u043b\u0438 \u044d\u0442\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0435 1.22.2), \u0438 \u0435\u0441\u043b\u0438 \u0432 \u043f\u0443\u043d\u043a\u0442\u0435 4 \u044d\u0442\u0430\u043f\u0430 3 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0439\u0442\u0435\u0441\u044c \u0441\u044e\u0434\u0430 \u0438 \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044e <strong>1.20.2<\/strong>.<\/p>\n<p>\u0418 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0434\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u044d\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>sudo apt-mark hold kubeadm kubelet kubectl<\/code><\/pre>\n<h3>\u042d\u0442\u0430\u043f 3. \u041f\u0443\u043d\u043a\u0442 1.<\/h3>\n<pre><code class=\"bash\">sudo swapoff \u2013a<\/code><\/pre>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0435\u0440\u0430\u0431\u043e\u0447\u0430\u044f. \u0411\u0443\u0434\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/efe\/56f\/e73\/efe56fe7315d7ccd577439ed41500975.png\" width=\"1068\" height=\"72\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/efe\/56f\/e73\/efe56fe7315d7ccd577439ed41500975.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u042f \u0437\u0430\u043c\u043e\u0440\u043e\u0447\u0438\u043b\u0441\u044f \u0438 \u0434\u0430\u0436\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u043b \u0441 \u043f\u0435\u0440\u0435\u043f\u0435\u0447\u0430\u0442\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f85\/8de\/61f\/f858de61f85648c3f5596e7c624a056f.png\" width=\"1810\" height=\"456\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f85\/8de\/61f\/f858de61f85648c3f5596e7c624a056f.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0442\u0438\u0440\u0435\u0448\u043a\u0430 \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u0442\u0438\u0440\u0435\u0448\u043a\u0430 -_- . \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u044d\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">sudo swapoff -a<\/code><\/pre>\n<h3>\u042d\u0442\u0430\u043f 3. \u041f\u0443\u043d\u043a\u0442 4.<\/h3>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0435\u0441\u0442\u044c <strong>!\u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435!<\/strong> \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435. \u041d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>sudo kubeadm init --pod-network-cidr=10.244.0.0\/16<\/code><\/pre>\n<p>\u0414\u0430, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 <strong>Flannel<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0430\u043b\u0435\u0435 \u043f\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438.<\/p>\n<h2>\u042d\u0442\u0430\u043f 3. \u041f\u0443\u043d\u043a\u0442 7.<\/h2>\n<p>\u0422\u0443\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432\u0435\u0440\u043d\u0430\u044f, \u043d\u043e \u0430\u0434\u0440\u0435\u0441 \u0441\u043b\u0435\u0442\u0435\u043b \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u044d\u0442\u043e:<\/p>\n<pre><code>sudo kubectl apply -f https:\/\/raw.githubusercontent.com\/coreos\/flannel\/master\/Documentation\/kube-flannel.yml<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451. \u041f\u043e\u0432\u0442\u043e\u0440\u044f\u0439\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0434\u043b\u044f worker-\u043d\u043e\u0434\u044b (\u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0443\u043d\u043a\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f master-\u0443\u0437\u043b\u0430).<\/p>\n<\/div>\n<\/details>\n<p><strong>UPD 21.10.21 <\/strong>\u041f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b<strong> <\/strong>\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438 \u043d\u0430 <code>CentOS 8<\/code> \u043f\u043e \u044d\u0442\u043e\u0439 <a href=\"https:\/\/upcloud.com\/community\/tutorials\/install-kubernetes-cluster-centos-8\/\">\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438<\/a>. \u041f\u0440\u043e\u0431\u043b\u0435\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0431\u044b\u043b\u043e (\u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 <code>Ubuntu<\/code>), \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043e\u0447\u0435\u043d\u044c \u0434\u0430\u0436\u0435 \u0440\u0430\u0431\u043e\u0447\u0430\u044f. \u041d\u043e \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0443 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u043e\u0447\u0443 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 Kubernetes \u043d\u0430 CentOS 8.<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441 <code>cat -<\/code>\u043d\u0435\u0440\u0430\u0431\u043e\u0447\u0438\u0435, \u044f \u0438\u0445 \u0442\u0443\u0442 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u043b. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432 \u043f\u0443\u043d\u043a\u0442\u0435 6:<\/p>\n<pre><code>cat &lt;&lt;EOF> \/etc\/sysctl.d\/k8s.conf net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 EOF<\/code><\/pre>\n<p>\u0418 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432 \u043f\u0443\u043d\u043a\u0442\u0435 1 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0430:<\/p>\n<pre><code>cat &lt;&lt;EOF> \/etc\/yum.repos.d\/kubernetes.repo [kubernetes] name=Kubernetes baseurl=https:\/\/packages.cloud.google.com\/yum\/repos\/kubernetes-el7-\\$basearch enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https:\/\/packages.cloud.google.com\/yum\/doc\/yum-key.gpg https:\/\/packages.cloud.google.com\/yum\/doc\/rpm-package-key.gpg exclude=kubelet kubeadm kubectl EOF<\/code><\/pre>\n<p>\u041e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 &#8212; \u0432 \u044d\u0442\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u0434\u043e\u0432\u0435\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0445\u043e\u0441\u0442\u044b. \u0415\u0441\u043b\u0438 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0447\u0438\u0441\u0442\u043e \u043f\u043e \u0441\u0442\u0430\u0442\u044c\u0435, \u0442\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043e ingress-nginx (\u043b\u0438\u0447\u043d\u043e \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u043e\u0441\u0442\u043e <a href=\"https:\/\/linuxconfig.org\/redhat-8-stop-start-firewall\">\u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c<\/a> \u0444\u0430\u0435\u0440\u0432\u043e\u043b (\u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c dev \u043a\u043b\u0430\u0441\u0442\u0435\u0440).<\/p>\n<p>\u0418 \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 Ubuntu \u043d\u0430 CentOS 8 \u044f \u0441\u043c\u043e\u0433 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0430\u043c\u0443\u044e \u043a\u0440\u0430\u0439\u043d\u044e\u044e (1.22.2) \u0432\u0435\u0440\u0441\u0438\u044e \u043a\u0443\u0431\u0430.<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e! \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 Kubernetes \u043a\u043b\u0430\u0441\u0442\u0435\u0440! <a href=\"#0\">\u2191<\/a><\/p>\n<p><a class=\"anchor\" name=\"2\" id=\"2\"><\/a><\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Helm<\/h3>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0432\u0437\u044f\u0442\u0430 \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e <a href=\"https:\/\/helm.sh\/docs\/intro\/install\/\">\u0441\u0430\u0439\u0442\u0430<\/a> \u0434\u043b\u044f Ubuntu.<\/p>\n<pre><code class=\"bash\">curl https:\/\/baltocdn.com\/helm\/signing.asc | sudo apt-key add - sudo apt-get install apt-transport-https --yes echo \"deb https:\/\/baltocdn.com\/helm\/stable\/debian\/ all main\" | sudo tee \/etc\/apt\/sources.list.d\/helm-stable-debian.list sudo apt-get update sudo apt-get install helm<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438:<\/p>\n<pre><code class=\"bash\">helm version<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8fb\/4ee\/f3c\/8fb4eef3c9b944dfe2ed653d3bd773d9.png\" width=\"1436\" height=\"78\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8fb\/4ee\/f3c\/8fb4eef3c9b944dfe2ed653d3bd773d9.png\"\/><figcaption><\/figcaption><\/figure>\n<details class=\"spoiler\">\n<summary>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0434\u043b\u044f CentOS 8. <\/summary>\n<div class=\"spoiler__content\">\n<p>\u0422\u043e\u0436\u0435 \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e <a href=\"https:\/\/helm.sh\/docs\/intro\/install\/#from-script\">\u0441\u0430\u0439\u0442\u0430<\/a>:<\/p>\n<pre><code class=\"bash\">curl -fsSL -o get_helm.sh https:\/\/raw.githubusercontent.com\/helm\/helm\/main\/scripts\/get-helm-3 chmod 700 get_helm.sh .\/get_helm.sh<\/code><\/pre>\n<\/div>\n<\/details>\n<p>Helm \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d! <a href=\"#0\">\u2191<\/a><\/p>\n<p><a class=\"anchor\" name=\"3\" id=\"3\"><\/a><\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Ingress-nginx<\/h3>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0441\u0442\u044f\u043d\u0443\u043b \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 <a href=\"https:\/\/kubernetes.github.io\/ingress-nginx\/deploy\/#using-helm\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<pre><code class=\"bash\">helm repo add ingress-nginx https:\/\/kubernetes.github.io\/ingress-nginx  helm repo update  helm install ingress-nginx ingress-nginx\/ingress-nginx<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b:<\/p>\n<pre><code>kubectl get svc<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e87\/915\/732\/e87915732ae701b58493726587a53d9d.png\" width=\"2244\" height=\"190\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e87\/915\/732\/e87915732ae701b58493726587a53d9d.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0431\u044b \u0432\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c <strong>GKE<\/strong> \u0438\u043b\u0438 <strong>AWS<\/strong>, \u0442\u043e \u0432 \u0433\u0440\u0430\u0444\u0435 <code>EXTERNAL-IP<\/code> \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0431\u044b \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 IP-\u0430\u0434\u0440\u0435\u0441. <\/p>\n<p>\u0410 Ingress-\u0441\u0435\u0440\u0432\u0438\u0441 \u0441\u0442\u0430\u043b \u0431\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443: <code>http:\/\/*external-ip*:80<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/ce0\/da1\/6ed\/ce0da16ed7023c2d59bd42fb82f0a98e.jpeg\" alt=\"\u0412 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 &quot;Kubernetes-as-a-service&quot; \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u0430 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u2014 Cloud Load Balancer.\" title=\"\u0412 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 &quot;Kubernetes-as-a-service&quot; \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u0430 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u2014 Cloud Load Balancer.\" width=\"756\" height=\"567\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ce0\/da1\/6ed\/ce0da16ed7023c2d59bd42fb82f0a98e.jpeg\" data-blurred=\"true\"\/><figcaption>\u0412 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 &#171;Kubernetes-as-a-service&#187; \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u0430 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u2014 Cloud Load Balancer.<\/figcaption><\/figure>\n<p>\u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0435 \u041a\u0443\u0431 \u043d\u0430 \u0433\u043e\u043b\u043e\u0435 \u0436\u0435\u043b\u0435\u0437\u043e, \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043b\u0443\u0436\u0431\u044b \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 EXTERNAL-IP. \u042d\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 <a href=\"https:\/\/kubernetes.github.io\/ingress-nginx\/deploy\/baremetal\/#bare-metal-considerations\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a> \u043a Ingress-nginx (\u044d\u0442\u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0441\u0442\u044f\u043d\u0443\u043b \u043e\u0442\u0442\u0443\u0434\u0430 \u0436\u0435), \u0430 \u0442\u0430\u043a\u0436\u0435 <a href=\"https:\/\/docs.gitlab.com\/ee\/topics\/autodevops\/requirements.html#auto-devops-requirements-for-bare-metal\">\u0442\u0443\u0442<\/a>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/3a6\/127\/d5f\/3a6127d5f73c55f6869e6741edba0a55.jpeg\" alt=\"\u0412 &quot;bare-metal&quot; \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u044d\u0442\u0430 \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442.\" title=\"\u0412 &quot;bare-metal&quot; \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u044d\u0442\u0430 \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442.\" width=\"756\" height=\"484\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3a6\/127\/d5f\/3a6127d5f73c55f6869e6741edba0a55.jpeg\" data-blurred=\"true\"\/><figcaption>\u0412 &#171;bare-metal&#187; \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u044d\u0442\u0430 \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442.<\/figcaption><\/figure>\n<p>\u0411\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0435 \u0432 \u044d\u0442\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c Metallb, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043c\u0435\u043d\u0438\u0442 \u043d\u0430\u043c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a. <a href=\"#0\">\u2191<\/a><\/p>\n<p><a class=\"anchor\" name=\"4\" id=\"4\"><\/a><\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Metallb<\/h3>\n<p>\u0412\u043d\u0435\u0441\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 configmap:<\/p>\n<pre><code class=\"bash\">kubectl edit configmap -n kube-system kube-proxy<\/code><\/pre>\n<p>\u041d\u0443\u0436\u043d\u043e \u0432 <code>mode<\/code> \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c <code>ipvs<\/code>, a <code>strictARP<\/code> \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041a\u0443\u0441\u043e\u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code>apiVersion: kubeproxy.config.k8s.io\/v1alpha1  kind: KubeProxyConfiguration  mode: \"ipvs\"  ipvs:       strictARP: true<\/code><\/pre>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u043c, \u0435\u0441\u043b\u0438 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0438\u0431\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f vim. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u0432 \u043b\u044e\u0431\u043e\u0439 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0432\u0432\u043e\u0434\u0438\u0442\u0435:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/799\/b54\/34f\/799b5434f566d015630722bfb6d433b5.jpeg\" width=\"490\" height=\"350\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/799\/b54\/34f\/799b5434f566d015630722bfb6d433b5.jpeg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c Helm-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:<\/p>\n<pre><code>helm repo add metallb https:\/\/metallb.github.io\/metallb<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <code>values.yaml<\/code><strong> <\/strong>\u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d:<\/p>\n<pre><code>configInline:   address-pools:    - name: default      protocol: layer2      addresses:      - x.x.x.x\/24<\/code><\/pre>\n<p>\u0412 \u043f\u043e\u043b\u0435 <code>addresses<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0443\u043b IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0431\u0435\u0440\u0451\u0442 \u0432 \u0441\u0432\u043e\u0451 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Metallb. \u0410\u0434\u0440\u0435\u0441\u0430 \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 CIDR. \u0412 \u043c\u043e\u0451\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0447\u0438 \u043e \u043f\u0443\u043b\u0435 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u043d\u0435 \u0438\u0434\u0451\u0442. \u041c\u0430\u0441\u043a\u0430 \u043f\u043e\u0434\u0441\u0435\u0442\u0438 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e-\u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a &#171;<code>\/32<\/code>&#171;.<\/p>\n<p>\u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code>configInline:   address-pools:    - name: default      protocol: layer2      addresses:      - 194.87.253.108\/32      - 87.247.157.40\/32<\/code><\/pre>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u043c. \u0422\u0435\u043f\u0435\u0440\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c <code>helm chart metallb<\/code> \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:<\/p>\n<pre><code>helm install metallb metallb\/metallb -f values.yaml<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u044b:<\/p>\n<pre><code>kubectl get svc<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d9e\/98f\/bfa\/d9e98fbfa28545819ca716c05f5b50f7.png\" width=\"1976\" height=\"150\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d9e\/98f\/bfa\/d9e98fbfa28545819ca716c05f5b50f7.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u0441\u0451 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0442\u043e \u0432 \u0433\u0440\u0430\u0444\u0435 <code>EXTERNAL-IP<\/code> \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 IP-\u0430\u0434\u0440\u0435\u0441 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e48\/428\/710\/e48428710d5c97ccc1545d7acc2b2b3b.png\" width=\"1736\" height=\"350\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e48\/428\/710\/e48428710d5c97ccc1545d7acc2b2b3b.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u041a\u0443\u0431\u0430 \u043d\u0430 \u0433\u043e\u043b\u043e\u043c \u0436\u0435\u043b\u0435\u0437\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430. <a href=\"#0\">\u2191<\/a><\/p>\n<details class=\"spoiler\">\n<summary>\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041a \u043b\u044e\u0431\u043e\u043c\u0443 \u0438\u0437 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 (\u0441 \u0442\u0438\u043f\u043e\u043c <code>LoadBalancer<\/code>), \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043f\u043e <code>NodePort<\/code>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Ingress-\u0441\u0435\u0440\u0432\u0438\u0441 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443: <code>http:\/\/*ip-master-node*:*NodePort*<\/code>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/adb\/008\/413\/adb008413ef6590cdeb48283b577028f.png\" width=\"1940\" height=\"364\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/adb\/008\/413\/adb008413ef6590cdeb48283b577028f.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u043e\u043c\u0435\u0440 <code>NodePort<\/code> \u0438 \u0442\u0438\u043f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0442\u0443\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/469\/9dd\/8af\/4699dd8af81548ab61da3dc63ac10e75.png\" width=\"2234\" height=\"180\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/469\/9dd\/8af\/4699dd8af81548ab61da3dc63ac10e75.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u042d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430. \u041e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0442\u043e\u0439 \u0436\u0435 <a href=\"https:\/\/kubernetes.github.io\/ingress-nginx\/deploy\/baremetal\/#over-a-nodeport-service\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, example.com, \u0438 \u0441\u0432\u044f\u0436\u0435\u043c \u0435\u0433\u043e \u0441 IP-\u0430\u0434\u0440\u0435\u0441\u043e\u043c master-\u043d\u043e\u0434\u044b, \u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443: <code>http:\/\/example.com:32128<\/code>. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0442\u0440\u0435\u043c\u043d\u043e\u0432\u0430\u0442\u043e. \u041d\u043e \u043a\u0430\u043a \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0430 master-\u043d\u043e\u0434\u0443 nginx \u0438 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0441 \u043f\u043e\u0440\u0442\u0430 80 \u043d\u0430 \u043f\u043e\u0440\u0442 32128. \u0418 \u0442\u043e\u0433\u0434\u0430 Ingress \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>http:\/\/example.com<\/code>.<\/p>\n<p>\u041d\u0430\u0448\u0435\u043b \u0434\u0430\u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 <a href=\"https:\/\/github.com\/staticfloat\/docker-nginx-certbot\">Github<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0440\u043e\u043c\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 nginx \u0432 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u0435\u0449\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 SSL-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b. \u041d\u0430\u0434\u043e \u043b\u0438\u0448\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u043d\u0430 \u043a\u0430\u043a\u0438\u0435 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b, \u0438 \u0432\u0441\u0451 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043d \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u0430\u043c. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0440\u0430\u0434\u043e\u0432\u0430\u043b\u043e. <\/p>\n<p>\u041d\u043e \u043b\u0438\u0447\u043d\u043e \u0443 \u043c\u0435\u043d\u044f \u0441 \u044d\u0442\u043e\u0439 \u0441\u0445\u0435\u043c\u043e\u0439 \u043d\u0430\u0447\u0430\u043b\u0438\u0441\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043a\u043e\u0433\u0434\u0430 \u044f \u043d\u0430\u0447\u0430\u043b \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c Kubernetes dashboard \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 Keycloak. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u044d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u0443\u0441\u0442\u044c \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u0438.<\/p>\n<\/div>\n<\/details>\n<p><a class=\"anchor\" name=\"5\" id=\"5\"><\/a><\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 CI\/CD \u0432 GitLab<\/h2>\n<h3>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430<\/h3>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0438 \u043a\u0443\u043f\u0438\u0442\u044c \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f. \u0427\u0443\u0440, \u043c\u043e\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f <code>awesomeservice<\/code>, \u0430 \u0434\u043e\u043c\u0435\u043d\u043d\u0443\u044e \u0437\u043e\u043d\u0443 \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u043c\u043e\u0434\u043d\u0443\u044e \u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u0443\u044e \u2014 <code>.tech<\/code>. \u0413\u0434\u0435 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u044c, \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. <\/p>\n<p>C\u0432\u044f\u0436\u0435\u043c <code>external-ip<\/code> Ingress-nginx \u0441 \u043d\u043e\u0432\u044b\u043c \u043a\u0443\u043f\u043b\u0435\u043d\u043d\u044b\u043c \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 A-\u0437\u0430\u043f\u0438\u0441\u044c (<code>awesomeservice.tech -> 194.87.253.108<\/code>). \u041f\u043e\u043b\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 DNS-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0442\u0440\u0451\u0445 \u0447\u0430\u0441\u043e\u0432. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e Ingress-nginx \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0443\u0436\u0435 \u043f\u043e \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u043c\u0443 \u0438\u043c\u0435\u043d\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c41\/cd8\/3c5\/c41cd83c5789e9660b0c5fe294ff3be9.png\" width=\"1782\" height=\"366\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c41\/cd8\/3c5\/c41cd83c5789e9660b0c5fe294ff3be9.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430, \u0431\u0443\u0434\u0435\u0442 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043d\u0430\u044f, \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043e \u0441\u0432\u043e\u0438\u043c API. \u0423 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441 <code>coolapp<\/code>. \u0418 \u043a\u0440\u044f\u0445\u0442\u0435\u0442\u044c \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>http:\/\/coolapp.awesomeservice.tech<\/code>. \u041f\u0440\u0438\u0447\u0435\u043c \u044d\u0442\u043e production-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c. \u0415\u0449\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f test- \u0438 staging-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<strong>. <\/strong>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u043e \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0438\u043c\u0435\u043d\u0430\u043c\u0438:<\/p>\n<ol>\n<li>\n<p>http:\/\/<strong>coolapp<\/strong>.awesomeservice.tech<\/p>\n<\/li>\n<li>\n<p>http:\/\/<strong>staging.coolapp<\/strong>.awesomeservice.tech<\/p>\n<\/li>\n<li>\n<p>http:\/\/<strong>qa01.coolapp<\/strong>.awesomeservice.tech<\/p>\n<\/li>\n<li>\n<p>http:\/\/<strong>qa02.coolapp<\/strong>.awesomeservice.tech <\/p>\n<\/li>\n<\/ol>\n<p>\u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0449\u0451 \u0447\u0435\u0442\u044b\u0440\u0435 A-\u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u044b\u0445 \u0438\u043c\u0435\u043d: <code>coolapp.<\/code>, <code>staging.coolapp.<\/code>, <code>qa01.coolapp.<\/code>, <code>qa02.coolapp.<\/code>. \u0418 \u0434\u0430, \u0432\u0441\u0435 \u044d\u0442\u0438 \u0438\u043c\u0435\u043d\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u044e\u0442\u0441\u044f \u043d\u0430 Ingress <code>EXTERNAL-IP<\/code>. <a href=\"#0\">\u2191<\/a><\/p>\n<p><a class=\"anchor\" name=\"6\" id=\"6\"><\/a><\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 GitLab<\/h2>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/676\/b1d\/b53\/676b1db539f4b9a746adf9d6127819d8.png\" width=\"300\" height=\"338\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/676\/b1d\/b53\/676b1db539f4b9a746adf9d6127819d8.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0443\u0441\u0442\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442. \u0412 2\u043a21 \u0440\u0435\u0431\u044f\u0442\u0430 \u0438\u0437 GitLab \u0435\u0449\u0435 \u043d\u0435 \u0437\u0430\u0432\u0435\u0437\u043b\u0438 \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f Python-\u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u00af\\_(\u30c4)_\/\u00af.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/977\/b39\/1a8\/977b391a89bdc29b54305e09a1672b6c.png\" width=\"1656\" height=\"882\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/977\/b39\/1a8\/977b391a89bdc29b54305e09a1672b6c.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 coolapp \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 awesomeservice<strong>. <\/strong>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c \u0441\u043b\u0435\u0433\u043a\u0430 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0430 FastApi \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 <a href=\"https:\/\/habr.com\/ru\/company\/domclick\/blog\/551332\/\">\u0441\u0442\u0430\u0442\u0435\u0439<\/a>. \u0418\u0435\u0440\u0430\u0440\u0445\u0438\u044f:<\/p>\n<pre><code>coolapp \u251c\u2500\u2500 Dockerfile \u251c\u2500\u2500 README.md \u251c\u2500\u2500 main.py \u2514\u2500\u2500 requirements.txt <\/code><\/pre>\n<details class=\"spoiler\">\n<summary>Dockerfile<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>FROM python:3.8  EXPOSE 8080  WORKDIR app  COPY requirements.txt requirements.txt  RUN pip install -r requirements.txt  COPY . .  CMD [\"uvicorn\", \"main:app\", \"--host\", \"0.0.0.0\", \"--port\", \"8080\"] <\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>main.py<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>from fastapi import FastAPI, Cookie from typing import Optional from uuid import uuid4  app = FastAPI() uuid = uuid4()   @app.get(\"\/api\/v1\/uuid\") async def root(key: Optional[str] = Cookie(None)):     print(key)     return {'uuid': uuid}   @app.get(\"\/healthz\") async def health_check():     return {} <\/code><\/pre>\n<p>\u0420\u0443\u0447\u043a\u0443 <code>\/healthz<\/code> \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Kubernetes \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u044b.<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>requirements.txt<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>fastapi==0.63.0 uvicorn==0.13.3 requests==2.26.0 <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0421\u0431\u043e\u0440\u043a\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"python\">docker build . -t coolapp  docker run -p 8080:8080 -t coolapp<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bf7\/974\/2da\/bf79742da0fa0b645edd3ee9f2a3fdfe.png\" width=\"1700\" height=\"476\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bf7\/974\/2da\/bf79742da0fa0b645edd3ee9f2a3fdfe.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0443\u0448\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439. <a href=\"#0\">\u2191<\/a><\/p>\n<p><a class=\"anchor\" name=\"7\" id=\"7\"><\/a><\/p>\n<h2>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/h2>\n<p>\u041d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0443 <code>&lt;Add Kubernetes cluster><\/code>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3a0\/9ca\/807\/3a09ca80751eb853d268c13f047d2864.png\" width=\"1498\" height=\"1078\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3a0\/9ca\/807\/3a09ca80751eb853d268c13f047d2864.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0421 \u043d\u0435\u0432\u043e\u0437\u043c\u0443\u0442\u0438\u043c\u044b\u043c \u043b\u0438\u0446\u043e\u043c \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c \u043c\u0438\u043c\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 GKE, AWS. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0443 \u00ab\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u00bb.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/86a\/cc8\/d95\/86acc8d9587bb0aff314f82fee4339b0.png\" width=\"2399\" height=\"548\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/86a\/cc8\/d95\/86acc8d9587bb0aff314f82fee4339b0.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, <a href=\"https:\/\/docs.gitlab.com\/ee\/user\/project\/clusters\/add_existing_cluster.html#how-to-add-an-existing-cluster\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f<\/a> \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0435 \u043f\u043e\u043b\u0435. \u041d\u043e \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0442\u0443\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/93b\/558\/862\/93b5588621122e72ea3733e0862cef3f.png\" width=\"1438\" height=\"1222\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/93b\/558\/862\/93b5588621122e72ea3733e0862cef3f.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0430\u0434\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0448\u0435\u0441\u0442\u044c \u043f\u043e\u043b\u0435\u0439:<\/p>\n<ol>\n<li>\n<p>Kubernetes cluster name<\/p>\n<\/li>\n<li>\n<p>Environment scope<\/p>\n<\/li>\n<li>\n<p>API URL<\/p>\n<\/li>\n<li>\n<p>CA Certificate<\/p>\n<\/li>\n<li>\n<p>Service Token<\/p>\n<\/li>\n<li>\n<p>Project namespace prefix (optional, unique)<\/p>\n<\/li>\n<\/ol>\n<p>\u0413\u0430\u043b\u043e\u0447\u043a\u0438 <em>RBAC-enabled cluster<\/em>, <em>GitLab-managed cluster<\/em> \u0438 <em>Namespace per environment<\/em><strong> <\/strong>\u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u043d\u044b.<\/p>\n<details class=\"spoiler\">\n<summary>Kubernetes cluster name<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0438\u043c\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u0423 \u043c\u0435\u043d\u044f \u044d\u0442\u043e<code>devkube<\/code>.<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>Environment scope<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c <code>*<\/code>.<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>API URL<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0412 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435:<\/p>\n<pre><code>kubectl cluster-info | grep -E 'Kubernetes master|Kubernetes control plane' | awk '\/http\/ {print $NF}'<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cd1\/df4\/987\/cd1df4987dffc3d74234e8c049783ea0.png\" width=\"2072\" height=\"72\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cd1\/df4\/987\/cd1df4987dffc3d74234e8c049783ea0.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0432\u044b\u0432\u043e\u0434 \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c.<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>CA Certificate<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>kubectl get secrets<\/code><\/pre>\n<p>\u041d\u0430\u0439\u0434\u0438\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043d\u0430 <code>default-token-xxxxx<\/code>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/521\/12d\/62d\/52112d62d7e1d8750d0e9003faa5cddf.png\" width=\"1522\" height=\"366\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/521\/12d\/62d\/52112d62d7e1d8750d0e9003faa5cddf.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u0430 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432\u043c\u0435\u0441\u0442\u043e <code>secret name<\/code>.<\/p>\n<pre><code>kubectl get secret \"secret name\" -o jsonpath=\"{['data']['ca\\.crt']}\" | base64 --decode<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9a5\/657\/74f\/9a565774fa9d3f390a5e6b27d93277e1.png\" width=\"1976\" height=\"692\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9a5\/657\/74f\/9a565774fa9d3f390a5e6b27d93277e1.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0432\u0435\u0441\u044c \u0432\u044b\u0432\u043e\u0434 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0432 \u043f\u043e\u043b\u0435 <code>CA Certificate<\/code>.<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>Service Token<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <code>gitlab-admin-service-account.yaml<\/code> \u0438 \u0432\u0441\u0442\u0430\u0432\u044c\u0442\u0435:<\/p>\n<pre><code class=\"yaml\">apiVersion: v1 kind: ServiceAccount metadata:   name: gitlab   namespace: kube-system --- apiVersion: rbac.authorization.k8s.io\/v1 kind: ClusterRoleBinding metadata:   name: gitlab-admin roleRef:   apiGroup: rbac.authorization.k8s.io   kind: ClusterRole   name: cluster-admin subjects:   - kind: ServiceAccount     name: gitlab     namespace: kube-system <\/code><\/pre>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0432 \u0442\u043e\u0439 \u0436\u0435 \u043f\u0430\u043f\u043a\u0435 \u0441 \u0444\u0430\u0439\u043b\u043e\u043c:<\/p>\n<pre><code>kubectl apply -f gitlab-admin-service-account.yaml<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435:<\/p>\n<pre><code>kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep gitlab | awk '{print $1}')<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/435\/de0\/dba\/435de0dba0c20688449c270bb21bbbb0.png\" width=\"2148\" height=\"690\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/435\/de0\/dba\/435de0dba0c20688449c270bb21bbbb0.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0442\u043e\u043a\u0435\u043d \u0438 \u0432\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0432 \u043f\u043e\u043b\u0435 <code>Service Token<\/code>.<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>Project namespace<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0451\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d  \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0447\u0430\u0441\u0442\u0435\u0439: \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 \u0438 \u0438\u043c\u0435\u043d\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u043d\u0435 \u0432\u043f\u0438\u0441\u0430\u0442\u044c, \u0442\u043e GitLab \u0441\u0430\u043c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u0435\u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441 \u0446\u0438\u0444\u0435\u0440\u043a\u0430\u043c\u0438. \u0423 \u043c\u0435\u043d\u044f \u044d\u0442\u043e <code>coolapp-devkube<\/code>. \u041f\u0440\u0435\u0444\u0438\u043a\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<\/div>\n<\/details>\n<p>\u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0432\u0441\u0435 \u043f\u043e\u043b\u044f \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/765\/6d5\/99e\/7656d599e2b943842c4dc21772bce0cd.jpg\" width=\"1279\" height=\"1282\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/765\/6d5\/99e\/7656d599e2b943842c4dc21772bce0cd.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0441\u0440\u0430\u0437\u0443 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438. \u0412 \u043e\u043a\u043d\u0435 &lt;<em>Base domain><\/em> \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e <code>awesomeservice.tech<\/code><strong>.<\/strong><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4a0\/47e\/4e4\/4a047e4e403c61bb050069cf250c461d.png\" width=\"1000\" height=\"608\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4a0\/47e\/4e4\/4a047e4e403c61bb050069cf250c461d.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c <em>Auto Devops<\/em>. \u041d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 &lt;<em>Enable Auto Devops><\/em>. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/294\/260\/d53\/294260d53a298f0bbcd897bc6d76deb5.png\" width=\"1996\" height=\"778\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/294\/260\/d53\/294260d53a298f0bbcd897bc6d76deb5.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041e\u0442\u043a\u0440\u043e\u044e\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0433\u0434\u0435 \u043d\u0443\u0436\u043d\u043e \u0442\u044b\u043a\u043d\u0443\u0442\u044c \u0433\u0430\u043b\u043e\u0447\u043a\u0443 &lt;<em>Default to Auto DevOps pipeline><\/em> \u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u042f \u0432\u044b\u0431\u0440\u0430\u043b \u0442\u0440\u0435\u0442\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0441 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0434\u0435\u043f\u043b\u043e\u0435\u043c \u0432 staging-\u0441\u0440\u0435\u0434\u0435, \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u0430\u044f (\u0441\u0442\u0443\u043f\u0435\u043d\u0447\u0430\u0442\u0430\u044f) \u0432\u044b\u043a\u0430\u0442\u043a\u0430 \u0432 production-\u0441\u0440\u0435\u0434\u0443. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f\u0445 \u0432\u044b\u043a\u0430\u0442\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/docs.gitlab.com\/ee\/topics\/autodevops\/requirements.html#auto-devops-deployment-strategy\">\u0442\u0443\u0442<\/a>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/585\/756\/de2\/585756de2560bfcc27ffedcd4eb95171.png\" width=\"2024\" height=\"780\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/585\/756\/de2\/585756de2560bfcc27ffedcd4eb95171.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0430\u043a\u0442\u0438\u0432\u0435\u043d Auto Devops. <a href=\"#0\">\u2191<\/a><\/p>\n<p><a class=\"anchor\" name=\"8\" id=\"8\"><\/a><\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 GitLab AutoDevops<\/h2>\n<p>\u041a\u0440\u0430\u0442\u043a\u0438\u0439 <a href=\"https:\/\/habr.com\/ru\/post\/416557\/\">\u043e\u0431\u0437\u043e\u0440<\/a> Auto Devops:<\/p>\n<blockquote>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/416557\/#auto-devops-vyhodit-v-obschiy-dostup-core-starter-premium-ultimate-free-bronze-silver-gold\"><strong>Auto DevOps<\/strong><\/a><strong>\u00a0\u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0432\u0435\u0441\u044c \u0446\u0438\u043a\u043b \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0438:<\/strong>\u00a0\u041f\u0440\u043e\u0441\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u043a\u043e\u043c\u043c\u0438\u0442 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u0432 GitLab \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044c\u0442\u0435 Auto DevOps \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c: \u044d\u0442\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u0442\u00a0<a href=\"https:\/\/docs.gitlab.com\/ee\/topics\/autodevops\/#auto-build\">\u0441\u0431\u043e\u0440\u043a\u0443<\/a>,\u00a0<a href=\"https:\/\/docs.gitlab.com\/ee\/topics\/autodevops\/#auto-test\">\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/a>, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443\u00a0<a href=\"https:\/\/docs.gitlab.com\/ee\/topics\/autodevops\/#auto-code-quality\">\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0434\u0430<\/a>,\u00a0<a href=\"https:\/\/docs.gitlab.com\/ee\/topics\/autodevops\/#auto-sast\">\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438<\/a>\u00a0\u0438\u00a0<a href=\"https:\/\/docs.gitlab.com\/ee\/topics\/autodevops\/#auto-license-management\">\u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0439<\/a>,\u00a0<a href=\"https:\/\/docs.gitlab.com\/ee\/topics\/autodevops\/#auto-review-apps\">\u043f\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/a>,\u00a0<a href=\"https:\/\/docs.gitlab.com\/ee\/topics\/autodevops\/#auto-dast\">\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/a>,\u00a0<a href=\"https:\/\/docs.gitlab.com\/ee\/topics\/autodevops\/#auto-deploy\">\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435<\/a>\u00a0\u0438\u00a0<a href=\"https:\/\/docs.gitlab.com\/ee\/topics\/autodevops\/#auto-monitoring\">\u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433<\/a>\u00a0\u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<\/blockquote>\n<details class=\"spoiler\">\n<summary>\u0417\u0432\u0443\u0447\u0438\u0442 \u0442\u0430\u043a \u043a\u043b\u0430\u0441\u0441\u043d\u043e, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u0443\u0442\u043e\u043f\u0438\u0447\u043d\u043e&#8230; \u0412\u0430\u043c \u0442\u0430\u043a \u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f?<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0414\u0430. \u0412\u0430\u043c \u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/80b\/cc8\/e07\/80bcc8e073480b3bebc443b8c08989e2.jpeg\" alt=\"\" title=\"\" width=\"212\" height=\"191\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/80b\/cc8\/e07\/80bcc8e073480b3bebc443b8c08989e2.jpeg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 AutoDevops \u0432 <s>master<\/s> main-\u0432\u0435\u0442\u043a\u0435 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a5c\/6d9\/93c\/a5c6d993c62342d5283e0ff49b591700.png\" width=\"2030\" height=\"762\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a5c\/6d9\/93c\/a5c6d993c62342d5283e0ff49b591700.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0418 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043e\u043d \u0437\u0430\u0444\u0435\u0439\u043b\u0438\u0442\u0441\u044f, \u0440\u0430\u0437\u0432\u0435 \u043c\u043e\u0433\u043b\u043e \u0431\u044b\u0442\u044c \u0438\u043d\u0430\u0447\u0435? <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dff\/715\/6e5\/dff7156e58649eee9dd15b6e68077e75.png\" width=\"2322\" height=\"978\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dff\/715\/6e5\/dff7156e58649eee9dd15b6e68077e75.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0421\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u0447\u0442\u043e \u0443\u0436\u0435 \u0440\u0430\u0434\u0443\u0435\u0442. \u0412 \u0431\u043b\u043e\u043a\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0448\u043b\u0438 \u0442\u0430\u043a\u0438\u0435 \u044d\u0442\u0430\u043f\u044b, \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438, \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0434\u0430 \u0438 \u0442.\u0434. \u0412 \u043e\u0431\u0449\u0435\u043c, \u043f\u0440\u043e\u0448\u043b\u043e \u0432\u0441\u0451 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043d\u0430\u0441 \u043c\u0430\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c2b\/822\/78e\/c2b82278eb0c7c507b239dbae0e18b77.png\" width=\"1766\" height=\"376\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c2b\/822\/78e\/c2b82278eb0c7c507b239dbae0e18b77.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0411\u044b\u0441\u0442\u0440\u043e\u0435 \u0433\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u0438\u0442\u043e\u043d\u0438\u0441\u0442\u043e\u0432: \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 Python-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u041d\u043e \u043c\u044b \u044d\u0442\u0430\u043f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430\u0448\u0430 \u0446\u0435\u043b\u044c \u2014 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0412\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441\u0442\u0430\u0434\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438.<\/p>\n<p>1) \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 <a href=\"https:\/\/docs.gitlab.com\/ee\/topics\/autodevops\/customize.html#disable-jobs\">\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/a> \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 <code>Settings -> CI\/CD -> Variables<\/code> \u0438 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <code>TEST_DISABLED=true.<\/code><\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 pipeline, \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c test.<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e89\/068\/be9\/e89068be97b8a44f8f6e948f9ce9ed73.png\" width=\"2354\" height=\"958\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e89\/068\/be9\/e89068be97b8a44f8f6e948f9ce9ed73.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041c\u044b \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b\u0438 test, \u043d\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0441\u0440\u0435\u0434\u0443 review (\u044d\u0442\u043e \u0430\u043d\u0430\u043b\u043e\u0433 \u043e\u0431\u0449\u0435\u043f\u0440\u0438\u043d\u044f\u0442\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f dev). Gitlab <a href=\"https:\/\/docs.gitlab.com\/ee\/topics\/autodevops\/troubleshooting.html#error-release--failed-timed-out-waiting-for-the-condition\">\u043e\u0436\u0438\u0434\u0430\u0435\u0442<\/a>, \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043f\u043e \u043f\u043e\u0440\u0442\u0443 5000, \u0443 \u043d\u0430\u0441 \u0436\u0435 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u043e\u0440\u0442 8080. \u041c\u043e\u0436\u0435\u043c, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 5000, \u043d\u043e \u0442\u0430\u043a \u043d\u0435\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. \u0425\u043e\u0447\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u0442 \u0441\u0430\u043c\u043e\u043c\u0443. \u0420\u0435\u0448\u0438\u043c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435.<\/p>\n<\/div>\n<\/details>\n<p>2) Auto DevOps \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c, \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e <a href=\"https:\/\/gitlab.com\/gitlab-org\/gitlab\/-\/blob\/master\/lib\/gitlab\/ci\/templates\/Auto-DevOps.gitlab-ci.yml\">\u0448\u0430\u0431\u043b\u043e\u043d\u0443<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u043f\u043e \u0441\u0443\u0442\u0438, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439<code>.gitlab-ci.yml.<\/code>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u0432\u043e\u0439 <code>.gitlab-ci.yml<\/code> \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u044d\u0442\u0430\u043f\u044b, \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0438\u0437 AutoDevops. \u041f\u043e\u0439\u0434\u0451\u043c \u043f\u043e \u0432\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u0443\u0442\u0438. <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u0435\u0442\u043a\u0443 <code>feature\/autodevops<\/code>(pipeline \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c).<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/915\/8d2\/dfc\/9158d2dfc19bb4d2586ed09c3abd5a2a.png\" width=\"2406\" height=\"1000\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/915\/8d2\/dfc\/9158d2dfc19bb4d2586ed09c3abd5a2a.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u0432\u0435\u0442\u043a\u0435 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u044d\u0442\u0430\u043f <code>test<\/code>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u044b <code>TETEST_DISABLED<\/code> \u043a\u0430\u043a <code>protect variable<\/code>. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0432 <code>protected <\/code>\u0432\u0435\u0442\u043a\u0430\u0445, \u043a\u043e\u0435\u0439 <code>main<\/code> \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 <a href=\"https:\/\/gitlab.com\/gitlab-org\/gitlab\/-\/blob\/master\/lib\/gitlab\/ci\/templates\/Auto-DevOps.gitlab-ci.yml\">\u0448\u0430\u0431\u043b\u043e\u043d<\/a> AutoDevops. \u041c\u044b \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u0441\u0442\u0430\u0434\u0438\u0438, \u0443\u0431\u0435\u0440\u0451\u043c \u0442\u043e\u043b\u044c\u043a\u043e <code>test<\/code>, <code>deploy<\/code> (\u044d\u0442\u043e \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0430 \u0438 \u0442\u0430\u043a), <code>dast<\/code> \u0438 <code>performance<\/code>. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <code>.gitlab-ci.yml<\/code> \u0438 \u0432\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"yaml\">variables:   ROLLOUT_RESOURCE_TYPE: deployment  # \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043f\u043b\u043e\u0439 \u0444\u0435\u0439\u043b\u0438\u0442\u0441\u044f   stages:   - build   - review   - staging   - canary   - production   - incremental rollout 10%   - incremental rollout 25%   - incremental rollout 50%   - incremental rollout 100%   - cleanup   include:   - template: Jobs\/Build.gitlab-ci.yml   - template: Jobs\/Deploy.gitlab-ci.yml  <\/code><\/pre>\n<p>\u0412 <code>stages<\/code><strong> <\/strong>\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u0432\u0441\u0435 \u0441\u0442\u0430\u0434\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f, \u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043d\u0430\u043c\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445<strong> <\/strong>(<code>include<\/code>)<strong>. <\/strong>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0448\u0430\u0431\u043b\u043e\u043d <a href=\"https:\/\/gitlab.com\/gitlab-org\/gitlab\/-\/blob\/master\/lib\/gitlab\/ci\/templates\/Jobs\/Deploy.gitlab-ci.yml\">\u0434\u0435\u043f\u043b\u043e\u044f<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432\u0441\u0435 \u0441\u0442\u0430\u0434\u0438\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 <code>review<\/code> \u0434\u043e <code>cleanup<\/code>. \u0422\u0430\u043c \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e <code>review<\/code> \u0438 <code>cleanup<\/code> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0432\u0435\u0442\u043a\u0430\u0445, \u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u2014 \u0432 main-\u0432\u0435\u0442\u043a\u0435, \u044d\u0442\u043e \u043b\u043e\u0433\u0438\u0447\u043d\u043e. <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0430\u043f\u0443\u0448\u0438\u0442\u044c, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0434\u0435\u043f\u043b\u043e\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e GitLab \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 5000. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0438 \u0442\u0443\u0442 \u043c\u044b \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b \u0438 \u043c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043f\u043e\u0440\u0442. GitLab \u0434\u0435\u043f\u043b\u043e\u0438\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Helm-<a href=\"https:\/\/gitlab.com\/gitlab-org\/cluster-integration\/auto-deploy-image\/-\/blob\/master\/assets\/auto-deploy-app\/values.yaml\">\u0447\u0430\u0440\u0442\u0430<\/a>, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0443 \u0441\u0435\u0431\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0430\u043f\u043a\u0443 <code>.gitlab <\/code>\u0438 \u0444\u0430\u0439\u043b <code>auto-deploy-values.yaml.<\/code> \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u043b\u043e\u0441\u044c, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c <code>service.internalPort<\/code>, <code>service.externalPort<\/code> \u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430\u0448 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 health check \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <code>livenessProbe<\/code> \u0438 <code>readinessProbe<\/code>. \u0422\u0430\u043a\u0436\u0435 \u044f \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e TLS \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u2014 \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0442\u0435\u043c\u0430. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0442\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Postman \u0431\u0443\u0434\u0435\u0442 \u0440\u0443\u0433\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 (\u0447\u0435\u0440\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0436\u0435 \u0432\u0441\u0451 \u043d\u043e\u0440\u043c).<\/p>\n<pre><code class=\"yaml\">service:   internalPort: 8080   externalPort: 8080  livenessProbe:   path: \/healthz  readinessProbe:   path: \/healthz  ingress:   enabled: true   tls:     enabled: false<\/code><\/pre>\n<p>\u0418\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u0430\u043a\u0430\u044f (\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442):<\/p>\n<pre><code>coolapp \u251c\u2500\u2500 .gitlab \u2502\u00a0\u00a0 \u2514\u2500\u2500 auto-deploy-values.yaml \u251c\u2500\u2500 .gitlab-ci.yml \u251c\u2500\u2500 Dockerfile \u251c\u2500\u2500 README.md \u251c\u2500\u2500 main.py \u2514\u2500\u2500 requirements.txt<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0448\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/397\/fc6\/813\/397fc6813c488ea1b705c47aac1bf3b4.png\" width=\"1492\" height=\"462\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/397\/fc6\/813\/397fc6813c488ea1b705c47aac1bf3b4.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b \u0440\u0430\u0431\u043e\u0442\u0443, \u043d\u043e \u043d\u0435 \u0441\u043f\u0435\u0448\u0438\u0442\u0435 \u0440\u0430\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u044d\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0432\u0441\u0451. \u0417\u0430\u0439\u0434\u0451\u043c \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0438 \u043a\u0443\u0434\u0430 \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u043b\u043e\u0441\u044c.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b88\/382\/5d1\/b883825d100b4eab56b75fa51c4fe7ad.png\" width=\"1492\" height=\"602\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b88\/382\/5d1\/b883825d100b4eab56b75fa51c4fe7ad.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0435\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0442\u0430\u0434\u0438\u0438 review \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 \u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u043e\u043c <code>29857899-review-feature-cu-jfvpge<\/code>. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u044d\u0442\u043e\u0442 URL \u043d\u0435\u0440\u0430\u0431\u043e\u0447\u0438\u0439, \u043c\u044b \u0436\u0435 \u043d\u0435 \u0434\u0435\u043b\u0430\u043b\u0438 A-\u0437\u0430\u043f\u0438\u0441\u044c \u0434\u043b\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/940\/17d\/ff9\/94017dff9ad438d8eb9a75436dca91e4.png\" width=\"2278\" height=\"858\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/940\/17d\/ff9\/94017dff9ad438d8eb9a75436dca91e4.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0435\u0442\u043a\u0438 GitLab (\u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0443 AutoDevops) \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 URL \u0438 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0434 \u043d\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441. \u0418\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0431\u044b\u043b\u0430 \u043d\u0430 \u043c\u043e\u0435\u043c \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u044b, \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0439 \u0432\u0435\u0442\u043a\u0438 \u0440\u0430\u0441\u043a\u0430\u0442\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e. \u041d\u043e \u0433\u043e\u0434\u0438\u0442\u0441\u044f \u044d\u0442\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439 \u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u0430 <code>awesomeservice.tech<\/code> \u0443\u043c\u0435\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u044b. \u0414\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438 \u0432 \u0446\u0435\u043b\u043e\u043c \u0434\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u044d\u0442\u043e \u0438\u0437\u043b\u0438\u0448\u043d\u044f\u044f \u0444\u0438\u0447\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0432\u0435\u0442\u043e\u043a \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0434\u0432\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f: qa01 \u0438 qa02. \u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u0432\u0430?<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/860\/40d\/2d4\/86040d2d4ebd5f5988fa50cc9ebd3c10.jpeg\" width=\"512\" height=\"512\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/860\/40d\/2d4\/86040d2d4ebd5f5988fa50cc9ebd3c10.jpeg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u043c \u0441\u0442\u0430\u0434\u0438\u0438 <code>review<\/code> \u0438 <code>cleanup<\/code>. \u0422\u0430\u043a \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0435\u0442\u043a\u0438, \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043b\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0438 \u0438\u0445 \u043d\u0430\u0434\u043e \u0447\u0438\u0441\u0442\u0438\u0442\u044c; \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 <code>cleanup<\/code> \u2014 \u043e\u043d\u0430 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u044d\u0442\u043e\u0439 \u0432\u0435\u0442\u043a\u043e\u0439. \u041f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u0442\u044c \u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c <code>review<\/code> \u0438 <code>cleanup<\/code> \u0438\u0437 <code>stages<\/code> \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f. \u0415\u0441\u043b\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d, \u0442\u043e \u0432\u0441\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0442\u0430\u043c \u0441\u0442\u0430\u0434\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0432 \u0431\u043b\u043e\u043a\u0435 <code>stages<\/code> \u043d\u0430\u0448\u0435\u0433\u043e gitlab-ci.yml. \u041d\u043e \u0441\u0442\u0430\u0434\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c, \u043a\u0430\u043a \u044f \u0443\u0436\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b \u0440\u0430\u043d\u0435\u0435, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 <a href=\"https:\/\/docs.gitlab.com\/ee\/topics\/autodevops\/customize.html#disable-jobs\">\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445<\/a> \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>REVIEW_DISABLED<\/code> \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u043e\u0431\u0435 \u0441\u0442\u0430\u0434\u0438\u0438, \u044d\u0442\u043e \u0432\u0438\u0434\u043d\u043e \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u043d\u044b\u0445 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 <a href=\"https:\/\/gitlab.com\/gitlab-org\/gitlab\/-\/blob\/master\/lib\/gitlab\/ci\/templates\/Jobs\/Deploy.gitlab-ci.yml\">Jobs\/Deploy.gitlab-ci.yml<\/a>. \u0417\u0430\u043e\u0434\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u043c \u0441\u0442\u0430\u0434\u0438\u044e <code>canary<\/code> (\u043e\u043d\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0430), \u044d\u0442\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u0432 main-\u0432\u0435\u0442\u043a\u0435.<\/p>\n<pre><code class=\"yaml\">variables:   ROLLOUT_RESOURCE_TYPE: deployment    REVIEW_DISABLED: \"true\"   CANARY_ENABLED: \"true\"   stages:   - build   - review  # off stage   - staging   - canary   - production   - incremental rollout 10%   - incremental rollout 25%   - incremental rollout 50%   - incremental rollout 100%   - cleanup  # off stage   include:   - template: Jobs\/Build.gitlab-ci.yml   - template: Jobs\/Deploy.gitlab-ci.yml  <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u0430\u043f\u0430 <code>review<\/code> \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0432\u043e\u044e \u0441\u0442\u0430\u0434\u0438\u044e \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <code>qa<\/code>. \u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0441\u0442\u0430\u0434\u0438\u044e <code>staging<\/code> \u0438\u0437 \u0442\u043e\u0433\u043e \u0436\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430. \u0412\u043e\u0442 \u0442\u0430\u043a \u043e\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442:<\/p>\n<pre><code class=\"yaml\">staging:   extends: .auto-deploy   stage: staging   script:     - auto-deploy check_kube_domain     - auto-deploy download_chart     - auto-deploy ensure_namespace     - auto-deploy initialize_tiller     - auto-deploy create_secret     - auto-deploy deploy   environment:     name: staging     url: http:\/\/$CI_PROJECT_PATH_SLUG-staging.$KUBE_INGRESS_BASE_DOMAIN   rules:     - if: '$CI_KUBERNETES_ACTIVE == null || $CI_KUBERNETES_ACTIVE == \"\"'       when: never     - if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH'       when: never     - if: '$STAGING_ENABLED' <\/code><\/pre>\n<p>\u041d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0440\u0430\u0432\u043e\u0447\u043a\u0438 \u0432 \u0431\u043b\u043e\u043a\u0430\u0445 <code>stage<\/code>, <code>environment<\/code> \u0438 <code>rules<\/code>, \u0430 \u0432\u043e\u0442 <code>script<\/code> \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043d\u0435\u0442\u0440\u043e\u043d\u0443\u0442\u044b\u043c. \u0412\u0441\u0451 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e: \u0432 <code>stage<\/code> \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u043c\u044f \u0441\u0442\u0430\u0434\u0438\u0438, \u0432 <code>environment.url<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u044c, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 (\u044d\u0442\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 Ingress \u0432 <code>spec.rules.host<\/code> \u2014 \u043a\u0442\u043e \u0437\u043d\u0430\u0435\u0442, \u0442\u043e\u0442 \u0437\u043d\u0430\u0435\u0442). \u0412 \u044d\u0442\u043e\u043c URL \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0435\u0444\u0438\u043a\u0441 <code>$CI_PROJECT_PATH_SLUG, <\/code>\u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0451\u0442\u0441\u044f \u0441 \u043f\u0443\u0442\u0435\u043c <code>http:\/\/mopckou-coolapp-staging.awesomeservice.tech<\/code>.<\/p>\n<p>\u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0442\u0440\u0451\u043c\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <code>qa01<\/code> \u0438 <code>qa02<\/code> \u0438\u0437\u0431\u0430\u0432\u0438\u043c\u0441\u044f \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430. \u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0440\u0443\u0447\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440, \u0432 \u043a\u0430\u043a\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0431\u043b\u043e\u043a\u0435 <code>rules<\/code>. \u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043d\u043e\u0432\u0435\u043d\u044c\u043a\u0438\u0435 \u0441\u0442\u0430\u0434\u0438\u0438 <code>qa01<\/code> \u0438 <code>qa02<\/code>:<\/p>\n<pre><code class=\"yaml\">qa01:   extends: .auto-deploy   stage: qa   script:     - auto-deploy check_kube_domain     - auto-deploy download_chart     - auto-deploy ensure_namespace     - auto-deploy initialize_tiller     - auto-deploy create_secret     - auto-deploy deploy   environment:     name: qa01     url: http:\/\/qa01.coolapp.$KUBE_INGRESS_BASE_DOMAIN  # \u0443\u0431\u0440\u0430\u043b \u043f\u0440\u0435\u0444\u0438\u043a\u0441 $CI_PROJECT_PATH_SLUG-   rules:     - if: '$CI_KUBERNETES_ACTIVE == null || $CI_KUBERNETES_ACTIVE == \"\"'       when: never # \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u0435\u043c     - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'       when: never # \u044d\u0442\u0430 \u0441\u0442\u0430\u0434\u0438\u044f \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0435\u0441\u043b\u0438 \u0432\u0435\u0442\u043a\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f main (default branch)     - if: '$CI_COMMIT_TAG || $CI_COMMIT_BRANCH'       when: manual # \u0434\u043b\u044f \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u0432\u044b\u0431\u043e\u0440\u0430 \u043a\u0443\u0434\u0430 \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c  qa02: # \u043a\u043e\u043f\u0438\u0440\u043a\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430, \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u043b qa01 \u043d\u0430 qa02   extends: .auto-deploy   stage: qa   script:     - auto-deploy check_kube_domain     - auto-deploy download_chart     - auto-deploy ensure_namespace     - auto-deploy initialize_tiller     - auto-deploy create_secret     - auto-deploy deploy   environment:     name: qa02     url: http:\/\/qa02.coolapp.$KUBE_INGRESS_BASE_DOMAIN   rules:     - if: '$CI_KUBERNETES_ACTIVE == null || $CI_KUBERNETES_ACTIVE == \"\"'       when: never     - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'       when: never     - if: '$CI_COMMIT_TAG || $CI_COMMIT_BRANCH'       when: manual<\/code><\/pre>\n<p>\u042d\u0442\u0438 \u0441\u0442\u0430\u0434\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044f\u043a\u043e\u0440\u0435\u0439. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439:<\/p>\n<pre><code class=\"yaml\">.qa_env_setup: &amp;qa_setup   extends: .auto-deploy   stage: qa   script:     - auto-deploy check_kube_domain     - auto-deploy download_chart     - auto-deploy ensure_namespace     - auto-deploy initialize_tiller     - auto-deploy create_secret     - auto-deploy deploy   rules:     - if: '$CI_KUBERNETES_ACTIVE == null || $CI_KUBERNETES_ACTIVE == \"\"'       when: never     - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'       when: never     - if: '$CI_COMMIT_TAG || $CI_COMMIT_BRANCH'       when: manual   qa01:   &lt;&lt;: *qa_setup   environment:     name: qa01     url: http:\/\/qa01.coolapp.$KUBE_INGRESS_BASE_DOMAIN  qa02:   &lt;&lt;: *qa_setup   environment:     name: qa02     url: http:\/\/qa02.coolapp.$KUBE_INGRESS_BASE_DOMAIN<\/code><\/pre>\n<p>\u0410 \u0434\u043b\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u044d\u0442\u0430\u043f\u043e\u0432 (<code>staging<\/code>, <code>canary<\/code>, <code>production<\/code>) \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0442\u0430\u043a \u0436\u0435 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0438\u043b\u0438\u0442\u044c URL, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043d\u0435\u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0433\u043e \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430.<\/p>\n<pre><code class=\"yaml\">staging:   extends: .auto-deploy   environment:     name: staging     url: http:\/\/staging.coolapp.$KUBE_INGRESS_BASE_DOMAIN  .url: &amp;production_url   environment:     name: production     url: http:\/\/coolapp.$KUBE_INGRESS_BASE_DOMAIN  production_manual:   extends: .auto-deploy   &lt;&lt;: *production_url  production:   extends: .auto-deploy   &lt;&lt;: *production_url  canary:   extends: .auto-deploy   &lt;&lt;: *production_url  timed rollout 10%:   extends: .auto-deploy   &lt;&lt;: *production_url  timed rollout 25%:   extends: .auto-deploy   &lt;&lt;: *production_url  timed rollout 50%:   extends: .auto-deploy   &lt;&lt;: *production_url  timed rollout 100%:   extends: .auto-deploy   &lt;&lt;: *production_url  rollout 10%:   extends: .auto-deploy   &lt;&lt;: *production_url  rollout 25%:   extends: .auto-deploy   &lt;&lt;: *production_url  rollout 50%:   extends: .auto-deploy   &lt;&lt;: *production_url  rollout 100%:   extends: .auto-deploy   &lt;&lt;: *production_url <\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u043b\u043d\u044b\u0439 gitlab-ci.yml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">variables:   ROLLOUT_RESOURCE_TYPE: deployment  # \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043f\u043b\u043e\u0439 \u0444\u0435\u0439\u043b\u0438\u0442\u0441\u044f   REVIEW_DISABLED: \"true\"   CANARY_ENABLED: \"true\"   stages:   - build   - review  # off stage   - qa   - staging   - canary   - production   - incremental rollout 10%   - incremental rollout 25%   - incremental rollout 50%   - incremental rollout 100%   - cleanup  # off stage   .qa_env_setup: &amp;qa_setup   extends: .auto-deploy   stage: qa   script:     - auto-deploy check_kube_domain     - auto-deploy download_chart     - auto-deploy ensure_namespace     - auto-deploy initialize_tiller     - auto-deploy create_secret     - auto-deploy deploy   rules:     - if: '$CI_KUBERNETES_ACTIVE == null || $CI_KUBERNETES_ACTIVE == \"\"'       when: never     - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'       when: never     - if: '$CI_COMMIT_TAG || $CI_COMMIT_BRANCH'       when: manual  .production_env_setup: &amp;production_url   environment:     name: production     url: http:\/\/coolapp.$KUBE_INGRESS_BASE_DOMAIN   qa01:   &lt;&lt;: *qa_setup   environment:     name: qa01     url: http:\/\/qa01.coolapp.$KUBE_INGRESS_BASE_DOMAIN  qa02:   &lt;&lt;: *qa_setup   environment:     name: qa02     url: http:\/\/qa02.coolapp.$KUBE_INGRESS_BASE_DOMAIN  staging:   extends: .auto-deploy   environment:     name: staging     url: http:\/\/staging.coolapp.$KUBE_INGRESS_BASE_DOMAIN  production_manual:   extends: .auto-deploy   &lt;&lt;: *production_url  production:   extends: .auto-deploy   &lt;&lt;: *production_url  canary:   extends: .auto-deploy   &lt;&lt;: *production_url  timed rollout 10%:   extends: .auto-deploy   &lt;&lt;: *production_url  timed rollout 25%:   extends: .auto-deploy   &lt;&lt;: *production_url  timed rollout 50%:   extends: .auto-deploy   &lt;&lt;: *production_url  timed rollout 100%:   extends: .auto-deploy   &lt;&lt;: *production_url  rollout 10%:   extends: .auto-deploy   &lt;&lt;: *production_url  rollout 25%:   extends: .auto-deploy   &lt;&lt;: *production_url  rollout 50%:   extends: .auto-deploy   &lt;&lt;: *production_url  rollout 100%:   extends: .auto-deploy   &lt;&lt;: *production_url   include:   - template: Jobs\/Build.gitlab-ci.yml   - template: Jobs\/Deploy.gitlab-ci.yml  <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041f\u0443\u0448\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u0437\u0430 \u043d\u043e\u0432\u0435\u043d\u044c\u043a\u0438\u043c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u043e\u043c:<\/p>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b4f\/0b3\/cef\/b4f0b3cef5f2ac6e336822cad753d5cf.gif\" width=\"1280\" height=\"720\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b4f\/0b3\/cef\/b4f0b3cef5f2ac6e336822cad753d5cf.gif\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u043e \u0432 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 <code>qa01<\/code> \u0438 <code>qa02<\/code>. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u044d\u0442\u0430\u043f\u0430 <code>qa01<\/code>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/45c\/7e4\/387\/45c7e4387aa72a5de7e30d1feafd8e18.png\" width=\"1226\" height=\"382\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/45c\/7e4\/387\/45c7e4387aa72a5de7e30d1feafd8e18.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u043e \u0441 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u043e\u043c <code>qa01.coolapp<\/code>. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0443:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7ee\/1ff\/d88\/7ee1ffd88a84bfaf04b74854721add19.png\" width=\"1452\" height=\"234\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7ee\/1ff\/d88\/7ee1ffd88a84bfaf04b74854721add19.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0438 \u043e\u0442\u0434\u0430\u0435\u0442 <code>uuid<\/code> \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443. Chrome \u0440\u0443\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0435\u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0435 HTTP-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435, \u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438. <\/p>\n<p>\u0412 GitLab \u0435\u0441\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0431\u043e\u0440\u0434\u0430 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043f\u043e\u0434 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438. \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 Deployments \u2192 Environments.<strong> <\/strong><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/df0\/b34\/7eb\/df0b347eb56ea832bcca89beefe9fca0.png\" width=\"2432\" height=\"890\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/df0\/b34\/7eb\/df0b347eb56ea832bcca89beefe9fca0.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u043e \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u043d\u0430 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041f\u0430\u043d\u0435\u043b\u044c \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u043e\u0434\u044b \u0435\u0441\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f: <code>app.gitlab.com\/app=$CI_PROJECT_PATH_SLUG<\/code> \u0438 <code>app.gitlab.com\/env=$CI_ENVIRONMENT_SLUG<\/code>. \u0420\u0435\u0431\u044f\u0442\u0430 \u0438\u0437 GitLab \u043f\u043e\u0437\u0430\u0431\u043e\u0442\u0438\u043b\u0438\u0441\u044c \u043e \u043d\u0430\u0441 \u0438 \u0432 Helm-\u0447\u0430\u0440\u0442\u0435 \u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u044e\u0442 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e \u043f\u043e\u0434\u0430\u043c, \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043b\u0438\u0448\u044c \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u044d\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u0415\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<code>HELM_UPGRADE_EXTRA_ARGS<\/code>, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0438\u0437 <a href=\"https:\/\/gitlab.com\/gitlab-org\/cluster-integration\/auto-deploy-image\/-\/blob\/master\/assets\/auto-deploy-app\/values.yaml\">Helm-\u0447\u0430\u0440\u0442\u0430<\/a>.<\/p>\n<p>\u042d\u0442\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u044f \u0443\u043a\u0430\u0437\u0430\u043b \u0432 <code>gitlab-ci.yaml<\/code> \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u0431\u043b\u043e\u043a\u0435 <code>variables<\/code>, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435. \u041d\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432\u0441\u0435 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 GitLab. <\/p>\n<pre><code class=\"yaml\">  HELM_UPGRADE_EXTRA_ARGS: \"--set gitlab.env=$CI_ENVIRONMENT_SLUG,gitlab.app=$CI_PROJECT_PATH_SLUG\" <\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0422\u0435\u043f\u0435\u0440\u044c \u0443\u0436\u0435 \u0442\u043e\u0447\u043d\u043e \u043f\u043e\u043b\u043d\u044b\u0439 gitlab-ci.yaml. \u0427\u0435\u0441\u0442\u043d\u043e-\u0447\u0435\u0441\u0442\u043d\u043e!<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>variables:   ROLLOUT_RESOURCE_TYPE: deployment   REVIEW_DISABLED: \"true\"   CANARY_ENABLED: \"true\"   HELM_UPGRADE_EXTRA_ARGS: \"--set gitlab.env=$CI_ENVIRONMENT_SLUG,gitlab.app=$CI_PROJECT_PATH_SLUG\"   stages:   - build   - review  # off stage   - qa   - staging   - canary   - production   - incremental rollout 10%   - incremental rollout 25%   - incremental rollout 50%   - incremental rollout 100%   - cleanup  # off stage   .qa_env_setup: &amp;qa_setup   extends: .auto-deploy   stage: qa   script:     - auto-deploy check_kube_domain     - auto-deploy download_chart     - auto-deploy ensure_namespace     - auto-deploy initialize_tiller     - auto-deploy create_secret     - auto-deploy deploy   rules:     - if: '$CI_KUBERNETES_ACTIVE == null || $CI_KUBERNETES_ACTIVE == \"\"'       when: never     - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'       when: never     - if: '$CI_COMMIT_TAG || $CI_COMMIT_BRANCH'       when: manual  .production_env_setup: &amp;production_url   environment:     name: production     url: http:\/\/coolapp.$KUBE_INGRESS_BASE_DOMAIN   qa01:   &lt;&lt;: *qa_setup   environment:     name: qa01     url: http:\/\/qa01.coolapp.$KUBE_INGRESS_BASE_DOMAIN  qa02:   &lt;&lt;: *qa_setup   environment:     name: qa02     url: http:\/\/qa02.coolapp.$KUBE_INGRESS_BASE_DOMAIN  staging:   extends: .auto-deploy   environment:     name: staging     url: http:\/\/staging.coolapp.$KUBE_INGRESS_BASE_DOMAIN  production_manual:   extends: .auto-deploy   &lt;&lt;: *production_url  production:   extends: .auto-deploy   &lt;&lt;: *production_url  canary:   extends: .auto-deploy   &lt;&lt;: *production_url  timed rollout 10%:   extends: .auto-deploy   &lt;&lt;: *production_url  timed rollout 25%:   extends: .auto-deploy   &lt;&lt;: *production_url  timed rollout 50%:   extends: .auto-deploy   &lt;&lt;: *production_url  timed rollout 100%:   extends: .auto-deploy   &lt;&lt;: *production_url  rollout 10%:   extends: .auto-deploy   &lt;&lt;: *production_url  rollout 25%:   extends: .auto-deploy   &lt;&lt;: *production_url  rollout 50%:   extends: .auto-deploy   &lt;&lt;: *production_url  rollout 100%:   extends: .auto-deploy   &lt;&lt;: *production_url   include:   - template: Jobs\/Build.gitlab-ci.yml   - template: Jobs\/Deploy.gitlab-ci.yml  <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041f\u0443\u0448\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0434\u0435\u043f\u043b\u043e\u0438\u043c \u0432 qa01 \u0438 qa02 \u0438 \u0431\u0435\u0436\u0438\u043c \u0432 Deployments \u2192 Environments.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/258\/2d1\/0d6\/2582d10d6f58dfad942f26d589dba1e6.png\" width=\"2426\" height=\"894\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/258\/2d1\/0d6\/2582d10d6f58dfad942f26d589dba1e6.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0434\u043e\u0441\u043a\u0430 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434 \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u043e \u0438 \u0432 \u043a\u0430\u043a\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438. \u042d\u0442\u0438 \u0437\u0435\u043b\u0435\u043d\u044b\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u043a\u0438, \u043a\u0441\u0442\u0430\u0442\u0438, \u043a\u043b\u0438\u043a\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u0435, \u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u0442\u044c\u0441\u044f \u043a \u043b\u043e\u0433\u0430\u043c \u043f\u043e\u0434\u044b, \u043e\u043d\u0438 \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043e\u043d\u043b\u0430\u0439\u043d.<\/p>\n<p>\u0421 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435\u043c \u043c\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438, \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043b\u0438\u0432\u0430\u0435\u043c \u0432\u0435\u0442\u043a\u0443 \u0432 <s>master<\/s> <code>main<\/code>. \u0418 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u0437\u0430 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c \u043f\u0430\u0439\u043f\u043b\u0430\u043d\u0447\u0438\u043a\u043e\u043c \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/897\/5b3\/0ca\/8975b30cacc4c2510ef417d7f4ca4466.gif\" width=\"1280\" height=\"720\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/897\/5b3\/0ca\/8975b30cacc4c2510ef417d7f4ca4466.gif\"\/><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/19d\/c5e\/d04\/19dc5ed046156cd3e4e3e008c5ba4a8f.png\" width=\"2428\" height=\"1148\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/19d\/c5e\/d04\/19dc5ed046156cd3e4e3e008c5ba4a8f.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443:<\/p>\n<p><a href=\"http:\/\/staging.coolapp.awesomeservice.tech\/api\/v1\/uuid\">http:\/\/staging.coolapp.awesomeservice.tech\/api\/v1\/uuid<\/a> \u2014 \u0434\u043b\u044f staging-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0e5\/ea3\/8b0\/0e5ea38b0987973d1d31919e19770650.png\" width=\"1700\" height=\"502\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0e5\/ea3\/8b0\/0e5ea38b0987973d1d31919e19770650.png\"\/><figcaption><\/figcaption><\/figure>\n<p><a href=\"http:\/\/coolapp.awesomeservice.tech\/api\/v1\/uuid\">http:\/\/coolapp.awesomeservice.tech\/api\/v1\/uuid<\/a> \u2014 \u0434\u043b\u044f prod-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/be4\/fa5\/3f0\/be4fa53f04711cdb41396a67023d5354.png\" width=\"1702\" height=\"526\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/be4\/fa5\/3f0\/be4fa53f04711cdb41396a67023d5354.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e. \u0412 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (Settings \u2192 CI\/CD \u2192 Variables) \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>PRODUCTION_REPLICAS <\/code>\u0441 \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043f\u043e\u0434. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f69\/958\/533\/f6995853328927b5b15bb730718a522e.png\" width=\"1840\" height=\"358\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f69\/958\/533\/f6995853328927b5b15bb730718a522e.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0418 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 <em>Re-deploy<\/em> \u0432 \u043f\u0430\u043d\u0435\u043b\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/58e\/c8d\/20f\/58ec8d20f6ebcac9bbf111a333288698.png\" width=\"2430\" height=\"538\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/58e\/c8d\/20f\/58ec8d20f6ebcac9bbf111a333288698.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0440\u0430\u0441\u043f\u043b\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0434\u043e \u043f\u044f\u0442\u0438 \u043f\u043e\u0434.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/58d\/2aa\/dcf\/58d2aadcfba0dec70dc020af200c53ff.png\" width=\"2434\" height=\"568\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/58d\/2aa\/dcf\/58d2aadcfba0dec70dc020af200c53ff.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e \u0438\u0434\u0435\u0435, \u043d\u0430 \u044d\u0442\u043e\u0439 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u043e\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c\u0441\u044f. \u041d\u043e \u043d\u0430 \u0434\u0435\u0441\u0435\u0440\u0442 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043d\u0430\u0440\u0435\u0435\u0447\u043d\u044b\u0439 \u0434\u0435\u043f\u043b\u043e\u0439. <a href=\"#0\">\u2191<\/a><\/p>\n<p><a class=\"anchor\" name=\"9\" id=\"9\"><\/a><\/p>\n<h2>\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u043a\u0430\u043d\u0430\u0440\u0435\u0435\u0447\u043d\u044b\u0439 \u0434\u0435\u043f\u043b\u043e\u0439 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435<\/h2>\n<p><a href=\"https:\/\/docs.gitlab.com\/ee\/user\/project\/canary_deployments.html\">\u0421\u0443\u0442\u044c<\/a> \u043a\u0430\u043d\u0430\u0440\u0435\u0435\u0447\u043d\u043e\u0433\u043e \u0434\u0435\u043f\u043b\u043e\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u043e\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u043a\u0430\u043a\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0432 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u0445, \u043c\u044b \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u0430\u043c\u0438). \u041d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c, \u043a\u0430\u043a \u0432\u0435\u0434\u0451\u0442 \u0441\u0435\u0431\u044f \u043d\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435; \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u043e\u0448\u0438\u0431\u043e\u043a, \u0442\u043e \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e; \u0435\u0441\u043b\u0438 \u0432\u0441\u0451 \u043f\u043b\u043e\u0445\u043e, \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e. <\/p>\n<p><strong>\u0414\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u043e:<\/strong> \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441\u0442\u0440\u0430\u0434\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0430 \u043d\u0435 \u0432\u0441\u0435, \u043a\u0430\u043a \u043f\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0434\u0435\u043f\u043b\u043e\u0435. <strong>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a:<\/strong> \u043d\u0430\u0434\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043a\u0430\u043a \u043d\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e, \u0442\u0430\u043a \u0438 \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u043a\u0430\u043d\u0430\u0440\u0435\u0435\u0447\u043d\u0443\u044e. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u0435 \u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u0448\u0438\u0431\u043a\u0430\u043c. \u041f\u043e \u0438\u0434\u0435\u0435, \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/services-networking\/service\/#virtual-ips-and-service-proxies\">sessionAffinity <\/a>\u0434\u043b\u044f Kubernetes services.<\/p>\n<p>\u041f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u0418\u0437\u043c\u0435\u043d\u0438\u043c \u043a\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u043e \u0435\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0443 \u0441\u0440\u0430\u0437\u0443 \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043e\u0442\u0432\u0435\u0442 \u0440\u0443\u0447\u043a\u0438 <code>\/api\/v1\/uuid<\/code> \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043a\u043b\u044e\u0447 <code>time<\/code>:<\/p>\n<pre><code class=\"python\">from time import ctime  from fastapi import FastAPI, Cookie from typing import Optional from uuid import uuid4  app = FastAPI() uuid = uuid4()   @app.get(\"\/api\/v1\/uuid\") async def root(key: Optional[str] = Cookie(None)):     print(key)     return {         'uuid': uuid,         'time': ctime()     }   @app.get(\"\/healthz\") async def health_check():     return {} <\/code><\/pre>\n<p>\u041f\u0443\u0448\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438 \u0436\u0434\u0451\u043c, \u043f\u043e\u043a\u0430 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 deploy \u0432 staging-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/140\/062\/a8d\/140062a8d771e63645a2aa60e1512458.png\" width=\"1956\" height=\"708\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/140\/062\/a8d\/140062a8d771e63645a2aa60e1512458.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 canary stage, \u0432 \u0442\u043e\u043c \u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0451\u043d \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0435 \u0436\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0434 \u0441 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0412 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u0434 \u0435\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0435\u0444\u0438\u043a\u0441 <code>-canary-<\/code>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/095\/f8d\/72f\/095f8d72f11cffe5f764cd46e3170697.png\" width=\"1772\" height=\"542\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/095\/f8d\/72f\/095f8d72f11cffe5f764cd46e3170697.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 \u0441\u0442\u0430\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b \u043d\u0430\u0436\u043c\u0435\u0442\u0435 \u043d\u0430 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0435 \u043d\u0430 \u044d\u0442\u0430\u043f \u0441 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u043c, \u0442\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0430\u044f \u0434\u043e\u043b\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043d\u0430 \u043a\u0430\u043d\u0430\u0440\u0435\u0435\u0447\u043d\u044b\u0435 \u043f\u043e\u0434\u044b.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e08\/44f\/d87\/e0844fd87343a2093e4131896517e788.png\" width=\"2028\" height=\"750\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e08\/44f\/d87\/e0844fd87343a2093e4131896517e788.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u044c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0439.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8b7\/0d9\/13a\/8b70d913ac64cb66c340585549d789a1.png\" width=\"2410\" height=\"602\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8b7\/0d9\/13a\/8b70d913ac64cb66c340585549d789a1.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u0438\u0431\u0430\u0432\u0438\u043b\u043e\u0441\u044c \u0435\u0449\u0451 \u043f\u044f\u0442\u044c \u043f\u043e\u0434 \u0441 \u0436\u0451\u043b\u0442\u044b\u043c \u043a\u0440\u0443\u0436\u043e\u0447\u043a\u043e\u043c, \u044d\u0442\u043e \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u043d\u0430\u0440\u0435\u0435\u0447\u043d\u043e\u0439 \u043f\u043e\u0434\u044b. \u041d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0432 \u043b\u044e\u0431\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443, \u0438 \u0434\u0430\u0436\u0435 \u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0435\u0441\u044c \u043f\u043e\u0442\u043e\u043a \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fcb\/479\/faf\/fcb479faf3587910e98c8a9718d1cc03.gif\" alt=\"\u0422\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0442\u043e \u043d\u0430 \u043a\u0430\u043d\u0430\u0440\u0435\u0435\u0447\u043d\u0443\u044e \u043f\u043e\u0434\u0443, \u0442\u043e \u043d\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0421\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 50\/50\" title=\"\u0422\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0442\u043e \u043d\u0430 \u043a\u0430\u043d\u0430\u0440\u0435\u0435\u0447\u043d\u0443\u044e \u043f\u043e\u0434\u0443, \u0442\u043e \u043d\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0421\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 50\/50\" width=\"1280\" height=\"720\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fcb\/479\/faf\/fcb479faf3587910e98c8a9718d1cc03.gif\"\/><figcaption>\u0422\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0442\u043e \u043d\u0430 \u043a\u0430\u043d\u0430\u0440\u0435\u0435\u0447\u043d\u0443\u044e \u043f\u043e\u0434\u0443, \u0442\u043e \u043d\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0421\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 50\/50<\/figcaption><\/figure>\n<p>\u0412 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0435 \u0434\u043e\u043b\u044e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u043a\u0430\u043a \u0432 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443, \u0442\u0430\u043a \u0438 \u0432 \u043c\u0435\u043d\u044c\u0448\u0443\u044e. \u041d\u043e \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b \u043d\u0430\u0436\u043c\u0435\u0442\u0435 \u043d\u0430 100 %, \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u0442 \u043d\u0430 \u043a\u0430\u043d\u0430\u0440\u0435\u0435\u0447\u043d\u044b\u0435 \u043f\u043e\u0434\u044b, \u0432 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u043f\u043e\u0434\u044b \u0441 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0438 \u0441\u0442\u0430\u0440\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0447\u043d\u0451\u0442 \u0443\u0434\u0430\u043b\u044f\u0442\u044c\u0441\u044f. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f49\/f71\/7e8\/f49f717e8e6fa01a92168f0a6e080c88.png\" width=\"1862\" height=\"688\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f49\/f71\/7e8\/f49f717e8e6fa01a92168f0a6e080c88.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u0435 \u043d\u043e\u0432\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b, \u0430 \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 \u043d\u0438\u0445 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f, \u043a\u0430\u043d\u0430\u0440\u0435\u0435\u0447\u043d\u044b\u0435 \u043f\u043e\u0434\u044b \u043d\u0430\u0447\u043d\u0443\u0442 \u0443\u0434\u0430\u043b\u044f\u0442\u044c\u0441\u044f. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/728\/d23\/298\/728d2329859b9db64b4f81473b87c887.png\" width=\"1842\" height=\"658\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/728\/d23\/298\/728d2329859b9db64b4f81473b87c887.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u0441c \u0434\u0435\u043f\u043b\u043e\u044f \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d. <a href=\"#0\">\u2191<\/a><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/655\/318\/30d\/65531830d33feb341595eab02e5bd5f1.png\" width=\"1780\" height=\"372\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/655\/318\/30d\/65531830d33feb341595eab02e5bd5f1.png\"\/><figcaption><\/figcaption><\/figure>\n<p><a class=\"anchor\" name=\"10\" id=\"10\"><\/a><\/p>\n<h2>TL;DR<\/h2>\n<blockquote>\n<p>1. <a href=\"#1\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435<\/a> \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043d\u0430 \u0433\u043e\u043b\u043e\u0435 \u0436\u0435\u043b\u0435\u0437\u043e.<\/p>\n<p>2. \u041a\u0443\u043f\u0438\u0442\u0435 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f (<a href=\"#5\">\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0442\u0443\u0442<\/a>), \u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e <code>awesomeservice.tech<\/code><strong>. <\/strong>\u0418 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0439\u0442\u0435 \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u0430: <code>coolapp.<\/code>, <code>staging.coolapp.<\/code>, <code>qa01.coolapp<\/code>, <code>qa02.coolapp<\/code>.<strong> <\/strong>\u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435:<\/p>\n<p>&#8212;<strong> coolapp.<\/strong>awesomeservice.tech<\/p>\n<p>&#8212; <strong>staging.coolapp<\/strong>.awesomeservice.tech<\/p>\n<p>&#8212;<strong> qa01.coolapp<\/strong>.awesomeservice.tech<\/p>\n<p>&#8212;<strong> qa02.coolapp.<\/strong>awesomeservice.tech<\/p>\n<p>\u041f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u043b\u0435\u0433\u043a\u043e \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432 gitlab-ci.yaml (\u0441\u043c. \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0443\u043d\u043a\u0442).<\/p>\n<p>3. \u0424\u043e\u0440\u043a\u043d\u0438\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 <a href=\"https:\/\/gitlab.com\/Mopckou\/coolapp\">\u0448\u0430\u0431\u043b\u043e\u043d<\/a> \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 Python. \u0422\u0430\u043c \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 gitlab-ci.yaml.<\/p>\n<p>4. <a href=\"#7\">\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435<\/a> \u0441\u0432\u043e\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u041a\u0443\u0431\u0430 \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u0432 GitLab. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 <code>base domain<\/code>. \u0423 \u043c\u0435\u043d\u044f \u044d\u0442\u043e <code>awesomeservice.tech<\/code>.<\/p>\n<p>5. <a href=\"#8\">\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0439\u0442\u0435<\/a> \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 <strong>AutoDevops<\/strong>.<\/p>\n<\/blockquote>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0438 \u043d\u0430\u0441\u043b\u0430\u0436\u0434\u0430\u0439\u0442\u0435\u0441\u044c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ab0\/06b\/ffb\/ab006bffb1058a0439b02f81bb40b67f.gif\" alt=\"Pipeline \u0432 \u043b\u044e\u0431\u043e\u0439 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u0432\u0435\u0442\u043a\u0435\" title=\"Pipeline \u0432 \u043b\u044e\u0431\u043e\u0439 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u0432\u0435\u0442\u043a\u0435\" width=\"1280\" height=\"720\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ab0\/06b\/ffb\/ab006bffb1058a0439b02f81bb40b67f.gif\"\/><figcaption>Pipeline \u0432 \u043b\u044e\u0431\u043e\u0439 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u0432\u0435\u0442\u043a\u0435<\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/aa1\/50c\/a9b\/aa150ca9becfb645d0592e80df2bbab5.gif\" alt=\" Pipeline \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0435\" title=\" Pipeline \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0435\" width=\"1280\" height=\"720\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/aa1\/50c\/a9b\/aa150ca9becfb645d0592e80df2bbab5.gif\"\/><figcaption> Pipeline \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0435<\/figcaption><\/figure>\n<hr\/>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u0432\u043e\u0439 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 Kubernetes \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 \u0434\u0432\u0443\u0445 \u043d\u043e\u0434, \u0438 \u0432\u0441\u0451 \u044d\u0442\u043e \u043d\u0430 \u0433\u043e\u043b\u043e\u043c \u0436\u0435\u043b\u0435\u0437\u0435. \u0418 \u0447\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u2014 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0432 GitLab \u0430\u0432\u0442\u043e\u0434\u0435\u043f\u043b\u043e\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041d\u0430 \u044d\u0442\u043e\u0439 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e\u0439 \u043d\u043e\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0442\u044c.  <\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u043b\u0438\u0437\u043d\u044b\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438. Best practice<\/summary>\n<div class=\"spoiler__content\">\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/61661f90f61f533babdf2eca\" data-style=\"\" id=\"61661f90f61f533babdf2eca\" width=\"\"><\/div>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u041f\u0441\u0441\u0441&#8230; \u043f\u0430\u0440\u0435\u043d\u044c<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9ca\/43c\/6bc\/9ca43c6bc9cb81c5fc1205e481ace983.png\" width=\"749\" height=\"807\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9ca\/43c\/6bc\/9ca43c6bc9cb81c5fc1205e481ace983.png\"\/><figcaption><\/figcaption><\/figure>\n<p><a href=\"https:\/\/gitlab.com\/Mopckou\/coolapp\">GitLab<\/a><\/p>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/companies\/domclick\/articles\/577964\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u0412\u043e\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0430\u0432\u043d\u043e \u043c\u0435\u043d\u044f \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442. \u0427\u0442\u043e \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u043b\u0443\u0447\u0448\u0435?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">41.05% <\/span><span class=\"tm-article-poll__answer-label\">\u0421\u0438\u043c\u043f\u043b-\u0434\u0438\u043c\u043f\u043b<\/span><span class=\"tm-article-poll__answer-votes\">39<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 41.05%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">58.95% <\/span><span class=\"tm-article-poll__answer-label\">\u041d\u0435\u0442! \u041f\u043e\u043f\u044b\u0442!<\/span><span class=\"tm-article-poll__answer-votes\">56<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 58.95%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 95 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.   \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 44 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. <\/div>\n<p><!--]--><\/div>\n<p><!--]--><\/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\/articles\/577964\/\"> https:\/\/habr.com\/ru\/articles\/577964\/<\/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<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0428\u0435\u043b 2021 \u0433\u043e\u0434, \u0440\u0443\u0441\u0441\u043a\u0438\u0435 \u0445\u0430\u043a\u0435\u0440\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e\u0442 \u043f\u0435\u0440\u0435\u0438\u0433\u0440\u044b\u0432\u0430\u0442\u044c \u0438 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0442\u044c \u0437\u0430\u0433\u043d\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0417\u0430\u043f\u0430\u0434, \u0432\u043c\u0435\u0448\u0438\u0432\u0430\u044f\u0441\u044c \u0432 \u0432\u044b\u0431\u043e\u0440\u044b, \u043b\u043e\u043c\u0430\u044f \u0444\u0435\u0439\u0441\u0431\u0443\u043a\u0438 \u0438 \u043f\u0435\u043d\u0442\u0430\u0433\u043e\u043d\u044b. \u0422\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0432\u044b\u0445\u043e\u0434\u044f\u0442 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u0435\u0443\u0431\u0438\u0432\u0430\u0435\u043c\u044b\u0445 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u043f\u043e \u0432\u0438\u0434\u0438\u043c\u043e\u043c\u0443, \u0432\u0441\u0435\u0445 \u043d\u0430\u0441 \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0443\u0442. \u0410 \u043a\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u043e \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0430\u0446\u0430\u043d\u0430\u0445 (\u043f\u0430\u0446\u0430\u043d\u0435\u0441\u0441\u0430\u0445)??? \u041a\u0430\u043a \u0431\u044b\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0447\u0435\u0442 \u0441\u0432\u043e\u0439 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438 \u043b\u0430\u043c\u043f\u043e\u0432\u044b\u0439 CI\/CD \u0441 \u0430\u0432\u0442\u043e\u0434\u0435\u043f\u043b\u043e\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043a\u0435\u043d\u0442\u044b \u0441 \u0440\u0430\u0439\u043e\u043d\u0430 \u043d\u0435 \u0437\u0430\u0441\u043c\u0435\u044f\u043b\u0438?<\/p>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442, \u043c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043b\u0435\u043a\u0441\u0435\u0439 \u0438 \u044f <s>\u0430\u043b\u043a\u043e\u0433\u043e\u043b\u0438\u043a<\/s> \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430 Python\/Go \u0432 \u0414\u043e\u043c\u043a\u043b\u0438\u043a. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043d\u0438\u0436\u0430\u0442\u044c \u043f\u043e\u0440\u043e\u0433 \u0432\u0445\u043e\u0434\u0430 \u0432 self-hosted Kubernetes \u0438 GitLab AutoDevops.<\/p>\n<p>\u042d\u0442\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0438\u0437 \u0441\u0435\u0440\u0438\u0438 \u00ab\u0443\u043b\u044c\u0442\u0438\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u0445\u00bb. \u041c\u044b \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 \u0440\u0430\u043d\u044c\u0448\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442<a href=\"https:\/\/habr.com\/ru\/company\/domclick\/blog\/531254\/\"> \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/a> \u0437\u0434\u043e\u0440\u043e\u0432\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. \u0418\u043b\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/domclick\/blog\/532030\/\">\u0433\u0430\u0439\u0434 \u043f\u043e \u043f\u043e\u0438\u0441\u043a\u0443<\/a> \u0443\u0442\u0435\u0447\u0435\u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 Python. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u0435\u043b\u043e. <\/p>\n<p>\u0421\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u043b\u0430\u0432\u044b \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043a\u0430 <a href=\"#0\">\u2191<\/a>, \u043d\u0430\u0436\u0430\u0432 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u0442\u0435 \u043a \u043e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u044e. \u0422\u0435, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u0432\u0441\u0451 \u0438 \u0441\u0440\u0430\u0437\u0443 \u2014 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u0435 \u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0443 <strong>TL;DR<\/strong>, \u0442\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043a\u0440\u0430\u0442\u043a\u0430\u044f \u0432\u044b\u0436\u0438\u043c\u043a\u0430 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<hr\/>\n<p><a class=\"anchor\" name=\"0\" id=\"0\"><\/a><\/p>\n<h2>\u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/h2>\n<ol>\n<li>\n<p><a href=\"#%D0%92%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#1\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Kubernetes \u043d\u0430 \u0433\u043e\u043b\u043e\u0435 \u0436\u0435\u043b\u0435\u0437\u043e<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#1\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Kubernetes<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#2\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Helm<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#3\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Ingress-nginx<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#4\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Metallb<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#5\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 CI\/CD \u0432 Gitlab<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#5\">\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#6\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 GitLab<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#7\">\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#8\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 GitLab AutoDevops<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#9\">\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u043a\u0430\u043d\u0430\u0440\u0435\u0435\u0447\u043d\u044b\u0439 \u0434\u0435\u043f\u043b\u043e\u0439 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#10\">TL;DR<\/a><\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<p><a class=\"anchor\" name=\"%D0%92%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5\" id=\"\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435\">\u043d\u0438\u0435&#187;><\/a><\/p>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u0436\u0438\u0432\u043e\u0442\u0440\u0435\u043f\u0435\u0449\u0443\u0449\u0435\u0433\u043e \u2014 \u0441 \u0446\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u041e\u0442\u043a\u0443\u0434\u0430 \u0432\u0437\u044f\u043b\u0438\u0441\u044c \u044d\u0442\u0438 514$? <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u0432\u0430\u0441 \u0436\u0438\u0432\u0435\u0442 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0441\u0442\u0430\u0440\u0442\u0430\u043f\u0435\u0440, \u0442\u043e \u0432\u0430\u043c \u0440\u0430\u043d\u043e \u0438\u043b\u0438 \u043f\u043e\u0437\u0434\u043d\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0433\u0434\u0435-\u0442\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 production-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 (\u043d\u0435 \u0440\u0443\u043a\u0430\u043c\u0438 \u0436\u0435 \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u0432 2\u043a21?). \u041f\u043b\u0430\u0442\u0438\u0442\u044c \u0436\u0430\u0434\u043d\u044b\u043c \u0433\u0438\u0433\u0430\u043d\u0442\u0430\u043c \u043f\u043e \u0442\u0438\u043f\u0443 \u0433\u0443\u0433\u043b\u0430 \u0438\u043b\u0438 \u0430\u043c\u0430\u0437\u043e\u043d\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u0434\u0435\u043d\u044c\u0433\u0438 \u2014 \u044d\u0442\u043e \u0437\u0430\u0448\u043a\u0432\u0430\u0440. \u0414\u0435\u043d\u044f\u0445-\u0442\u043e \u043d\u0435\u0442, \u0432\u043e\u0442 \u043c\u044b \u0438 \u0434\u0435\u0440\u0436\u0438\u043c\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c CI\/CD \u0437\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043d\u0435 \u043f\u0435\u0440\u0435\u0433\u0438\u0431\u0430\u0442\u044c \u043f\u0430\u043b\u043a\u0443 \u0432 \u0447\u0440\u0435\u0437\u043c\u0435\u0440\u043d\u043e\u0439 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438. <\/p>\n<p>\u041a\u043b\u0430\u0441\u0442\u0435\u0440 \u0440\u0435\u0448\u0438\u043b \u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0443\u0437\u043b\u043e\u0432 \u2014 master \u0438 worker. \u041e\u0431\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0438\u043c\u0435\u044e\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e 2&#215;2,2 \u0413\u0413\u0446, 4 \u0413\u0431 RAM, 40 \u0413\u0431 SSD. \u0410\u0440\u0435\u043d\u0434\u0430 \u043e\u0434\u043d\u043e\u0439 \u0432 \u043c\u0435\u0441\u044f\u0446 ~ 12$. \u0412 \u0433\u043e\u0434 \u0437\u0430 \u0434\u0432\u0435 \u043c\u0430\u0448\u0438\u043d\u044b ~ 278$. \u041f\u043b\u0430\u0442\u0438\u043b \u0432 \u0440\u0443\u0431\u043b\u044f\u0445, \u043f\u0435\u0440\u0435\u0432\u0435\u043b \u0432 \u0434\u043e\u043b\u043b\u0430\u0440\u044b \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432 (\u043a\u0443\u0440\u0441 72 \u0440).<\/p>\n<p>CI\/CD \u0440\u0435\u0448\u0438\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432 GitLab (\u043b\u0435\u0436\u0438\u0442 \u043a \u043d\u0435\u043c\u0443 \u0434\u0443\u0448\u0430). \u0418 \u043a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432. \u0415\u0449\u0435 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0433\u043e\u0434\u0430 \u0431\u044b\u043b silver-\u0430\u043a\u043a\u0430\u0443\u043d\u0442, \u0441 \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043d\u0435\u0435 \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0446\u0435\u043d\u0430\u043c\u0438 ~ 9$ \u0432 \u043c\u0435\u0441\u044f\u0446. \u041d\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0435\u0433\u043e \u0443\u043f\u0440\u0430\u0437\u0434\u043d\u0438\u043b\u0438 \u0438 \u043d\u0430 \u0435\u0433\u043e \u043c\u0435\u0441\u0442\u043e \u043f\u0440\u0438\u0448\u0435\u043b premium \u0437\u0430 19$ \u0432 \u043c\u0435\u0441\u044f\u0446 \u0438\u043b\u0438 228$ \u0432 \u0433\u043e\u0434. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0442\u0430\u043c \u043c\u043d\u043e\u0433\u043e \u043f\u043b\u044e\u0448\u0435\u043a \u0442\u0438\u043f\u0430 \u043e\u0432\u0435\u0440-\u0434\u043e\u0444\u0438\u0433\u0430 CI-\u043c\u0438\u043d\u0443\u0442, \u043a\u0430\u043d\u0430\u0440\u0435\u0435\u0447\u043d\u044b\u0439 \u0434\u0435\u043f\u043b\u043e\u0439, \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u0434\u0430\u0448\u0431\u043e\u0440\u0434 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0439 \u041a\u0443\u0431\u0430 \u0438 \u0442.\u0434., \u043d\u043e \u0446\u0435\u043d\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043a\u0443\u0441\u0430\u0447\u0430\u044f.<\/p>\n<p>\u0422\u0440\u0435\u0442\u044c\u044f \u0441\u0442\u0430\u0442\u044c\u044f, \u0441\u0430\u043c\u0430\u044f \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u2014 \u043f\u043e\u043a\u0443\u043f\u043a\u0430 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438. \u041c\u043d\u0435 \u043e\u0431\u043e\u0448\u043b\u043e\u0441\u044c \u0432 8$ \u0437\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0433\u043e\u0434 (\u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0430\u043c \u0432\u0440\u043e\u0434\u0435 \u0432 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u0435\u0440\u0443\u0442).<\/p>\n<p>\u0418\u0442\u043e\u0433\u043e: 278$ + 228$ + 8$ = 514$.<\/p>\n<p>\u0410 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043a\u0443\u043f\u0438\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d VPS \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0443\u0434\u0430 GitLab? \u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f <a href=\"https:\/\/docs.gitlab.com\/ee\/install\/requirements.html#memory\">\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442<\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u0443 \u0441 \u0434\u0432\u0443\u043c\u044f \u044f\u0434\u0440\u0430\u043c\u0438 \u0438 4 \u0413\u0431 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u044b. \u0415\u0441\u043b\u0438 \u0431\u0440\u0430\u0442\u044c VPS \u0443 \u0442\u043e\u0433\u043e \u0436\u0435 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430, \u0442\u043e \u0432\u044b\u0439\u0434\u0435\u0442 12$ \u0432 \u043c\u0435\u0441\u044f\u0446, \u0430 \u0432 \u0433\u043e\u0434 \u2014 144$. \u042d\u043a\u043e\u043d\u043e\u043c\u0438\u044f \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 84$ \u0437\u0430 \u0433\u043e\u0434. \u041d\u043e \u0442\u0443\u0442 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u0431\u043e\u0442\u0430 \u043e\u0431 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435, \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 GitLab. \u0418 \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430. \u0417\u043d\u0430\u0442\u043e\u043a\u0438 self-managed GitLab, \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u0435\u043d\u0442\u044b. <\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0435 \u0437\u0430\u043c\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u0441\u0432\u043e\u0435\u0433\u043e GitLab \u0438 \u0432\u0435\u0441\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b \u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0437\u0430 514$. \u041d\u043e \u0432\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0443 \u0434\u043d\u0435\u0439 \u043d\u0430\u0437\u0430\u0434, \u043d\u0435\u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044b\u0439 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u043c \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u043c \u0443\u0441\u043b\u0443\u0433, \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0433\u0443\u0433\u043b\u0438\u0442\u044c \u0432 \u043d\u0430\u0434\u0435\u0436\u0434\u0435 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0448\u0435\u0432\u044b\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b. \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u044b \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0435\u0448\u0435\u0432\u043b\u0435, \u0442\u0430\u043a \u0435\u0449\u0451 \u0438 \u043c\u043e\u0449\u043d\u0435\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0432 \u0430\u0440\u0435\u043d\u0434\u0443 VPS [3&#215;2,8 \u0413\u0413\u0446, 5 \u0413\u0431 RAM, 60 \u0413\u0431 SSD] \u0437\u0430 9$ \u0438 [2&#215;2,8 \u0413\u0413\u0446, 2 \u0413\u0431 RAM, 40 \u0413\u0431 SSD] \u0437\u0430 6$ \u0432 \u043c\u0435\u0441\u044f\u0446. \u0417\u0430 \u0433\u043e\u0434 \u0432\u044b\u0439\u0434\u0435\u0442: (9$ + 6$) * 12 + 228$ + 8$ = 416$. \u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u0430\u0440\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u044b \u0438\u043c\u0435\u043d\u043d\u043e \u0443 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430.<\/p>\n<p>\u0412\u044b\u0432\u043e\u0434: \u0435\u0441\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c\u0441\u044f \u0446\u0435\u043b\u044c\u044e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c, \u0442\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043d\u0430\u0439\u0434\u0443\u0442\u0441\u044f. \u0410 \u043d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u043e\u043a\u043e\u043d\u0447\u0435\u043d\u043e. \u0414\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u043b\u0433\u043e, \u043d\u0443\u0434\u043d\u043e \u0438 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0434\u0430\u0436\u0435 \u0447\u0435\u0440\u0435\u0441\u0447\u0443\u0440 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e; \u0434\u0443\u043c\u0430\u044e, \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0447\u0442\u0443\u0442 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0434\u0432\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430: \u044f \u0438 \u043d\u0430\u0448 \u0448\u0435\u0444-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0431\u043b\u043e\u0433\u0430 (\u0437\u0430 \u0447\u0442\u043e \u0435\u043c\u0443 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e!). <a href=\"#0\">\u2191<\/a><\/p>\n<p><a class=\"anchor\" name=\"1\" id=\"1\"><\/a><\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Kubernetes \u043d\u0430 \u0433\u043e\u043b\u043e\u0435 \u0436\u0435\u043b\u0435\u0437\u043e<\/h2>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Kubernetes<\/h3>\n<p>\u0412\u0430\u043c \u043b\u0435\u0433\u043a\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043e \u044d\u0442\u043e\u0439 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 <a href=\"https:\/\/www.reg.ru\/support\/vps-servery\/oblachnie-serveri-vps\/ustanovka-programmnogo-obespechenija\/kubernetes\">\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438<\/a>. \u041d\u043e \u0432 \u043d\u0435\u0439 \u0435\u0441\u0442\u044c \u0440\u044f\u0434 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 Kubernetes \u043d\u0430 Ubuntu 20.04 LTS<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u044d\u0442\u0430\u043f\u044b \u0438 \u043f\u0443\u043d\u043a\u0442\u044b. \u0417\u0434\u0435\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0442\u0435 \u043f\u0443\u043d\u043a\u0442\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430.<\/p>\n<h3>\u042d\u0442\u0430\u043f 1. \u041f\u0443\u043d\u043a\u0442 4.<\/h3>\n<pre><code class=\"bash\">sudo systemctl enable docker<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u044d\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0431\u0443\u0434\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <em>\/etc\/hosts<\/em>:<\/p>\n<pre><code class=\"bash\">nano \/etc\/hosts<\/code><\/pre>\n<p>\u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u0445\u043e\u0441\u0442 <em>ruvds-2p1sn<\/em>, \u043c\u043d\u0435 \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c:<\/p>\n<pre><code>127.0.0.1 ruvds-2p1sn<\/code><\/pre>\n<p>\u0410 \u0442\u0430\u043a\u0436\u0435 \u0432 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0438\u043c\u044f (\u044d\u0442\u043e \u0434\u043b\u044f master-\u043d\u043e\u0434\u044b; \u043a\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u0434\u043b\u044f worker-\u043d\u043e\u0434\u044b, \u0442\u043e \u0432\u0432\u0435\u0434\u0438\u0442\u0435 <code>kubernetes-worker<\/code>)<\/p>\n<pre><code>127.0.0.1 kubernetes-master<\/code><\/pre>\n<p>\u0423 \u043c\u0435\u043d\u044f \u0444\u0430\u0439\u043b \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u043c. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>sudo systemctl enable docker<\/code><\/pre>\n<h3>\u042d\u0442\u0430\u043f 2. \u041f\u0443\u043d\u043a\u0442 1.<\/h3>\n<pre><code class=\"bash\">curl -s https:\/\/packages.cloud.google.com\/apt\/doc\/apt-key.gpg | sudo apt-key add<\/code><\/pre>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u043e\u0448\u0438\u0431\u043a\u0435:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <em>curl<\/em>. \u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435:<\/p>\n<pre><code>apt install curl<\/code><\/pre>\n<p>\u041f\u043e\u0442\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0442\u0430\u043a\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>apt-get update &amp;&amp; apt-get install -y gnupg2<\/code><\/pre>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e. \u0422\u0435\u043f\u0435\u0440\u044c \u0443\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0438\u0437 \u043f\u0443\u043d\u043a\u0442\u0430 1 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u044d\u0442\u0430\u043f\u0430.<\/p>\n<h3>\u042d\u0442\u0430\u043f 2. \u041f\u0443\u043d\u043a\u0442 2.<\/h3>\n<pre><code>sudo apt-add-repository \"deb http:\/\/apt.kubernetes.io\/ kubernetes-xenial main\"<\/code><\/pre>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u043e\u0448\u0438\u0431\u043a\u0435:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<pre><code class=\"bash\">sudo apt-get install software-properties-common<\/code><\/pre>\n<p>\u0418 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0439\u0442\u0435\u0441\u044c \u043a \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u043f\u0443\u043d\u043a\u0442\u0430 2.<\/p>\n<h3>\u042d\u0442\u0430\u043f 2. \u041f\u0443\u043d\u043a\u0442 3.<\/h3>\n<p>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043b\u0435\u0433\u043a\u043e \u0433\u0443\u0433\u043b\u044f\u0442\u0441\u044f \u0438 \u0440\u0435\u0448\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439. \u0410 \u0432\u043e\u0442 \u0441 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u0435\u0435:<\/p>\n<pre><code class=\"bash\">sudo apt install kubeadm kubelet kubectl<\/code><\/pre>\n<p>\u0415\u0449\u0435 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0433\u043e\u0434\u0430 \u0441 \u043d\u0435\u0439 \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u041d\u043e \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u044d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 master-\u043d\u043e\u0434\u044b \u043d\u0430 <strong>\u044d\u0442\u0430\u043f\u0435 3 \u043f\u0443\u043d\u043a\u0442 4<\/strong>. \u0427\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c? \u0412\u044b\u0448\u043b\u0430 \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u2014 <strong>1.22.2.<\/strong> \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0436\u0435 \u0433\u043e\u0434\u0430 \u044f \u0441\u0442\u0430\u0432\u0438\u043b \u0432\u0435\u0440\u0441\u0438\u044e <strong>1.20.2<\/strong> \u0438 \u0432\u0441\u0451 \u0431\u044b\u043b\u043e \u0445\u043e\u0440\u043e\u0448\u043e. \u041f\u0440\u0438\u0447\u0438\u043d\u0443 \u0441\u0431\u043e\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044f \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u0430\u0445 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u043d\u0435 \u043d\u0430\u0448\u0435\u043b. \u041f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0443\u0442\u0438\u043b\u0438\u0442. \u0410 \u043c\u044b \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c:<\/p>\n<pre><code class=\"bash\">sudo apt install kubeadm=1.20.2-00 kubelet=1.20.2-00 kubectl=1.20.2-00<\/code><\/pre>\n<p>\u0412\u0430\u043c \u0436\u0435 \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 (\u0435\u0441\u043b\u0438 \u044d\u0442\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0435 1.22.2), \u0438 \u0435\u0441\u043b\u0438 \u0432 \u043f\u0443\u043d\u043a\u0442\u0435 4 \u044d\u0442\u0430\u043f\u0430 3 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0439\u0442\u0435\u0441\u044c \u0441\u044e\u0434\u0430 \u0438 \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044e <strong>1.20.2<\/strong>.<\/p>\n<p>\u0418 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0434\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u044d\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>sudo apt-mark hold kubeadm kubelet kubectl<\/code><\/pre>\n<h3>\u042d\u0442\u0430\u043f 3. \u041f\u0443\u043d\u043a\u0442 1.<\/h3>\n<pre><code class=\"bash\">sudo swapoff \u2013a<\/code><\/pre>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0435\u0440\u0430\u0431\u043e\u0447\u0430\u044f. \u0411\u0443\u0434\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u042f \u0437\u0430\u043c\u043e\u0440\u043e\u0447\u0438\u043b\u0441\u044f \u0438 \u0434\u0430\u0436\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u043b \u0441 \u043f\u0435\u0440\u0435\u043f\u0435\u0447\u0430\u0442\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0442\u0438\u0440\u0435\u0448\u043a\u0430 \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u0442\u0438\u0440\u0435\u0448\u043a\u0430 -_- . \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u044d\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">sudo swapoff -a<\/code><\/pre>\n<h3>\u042d\u0442\u0430\u043f 3. \u041f\u0443\u043d\u043a\u0442 4.<\/h3>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0435\u0441\u0442\u044c <strong>!\u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435!<\/strong> \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435. \u041d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>sudo kubeadm init --pod-network-cidr=10.244.0.0\/16<\/code><\/pre>\n<p>\u0414\u0430, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 <strong>Flannel<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0430\u043b\u0435\u0435 \u043f\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438.<\/p>\n<h2>\u042d\u0442\u0430\u043f 3. \u041f\u0443\u043d\u043a\u0442 7.<\/h2>\n<p>\u0422\u0443\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432\u0435\u0440\u043d\u0430\u044f, \u043d\u043e \u0430\u0434\u0440\u0435\u0441 \u0441\u043b\u0435\u0442\u0435\u043b \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u044d\u0442\u043e:<\/p>\n<pre><code>sudo kubectl apply -f https:\/\/raw.githubusercontent.com\/coreos\/flannel\/master\/Documentation\/kube-flannel.yml<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451. \u041f\u043e\u0432\u0442\u043e\u0440\u044f\u0439\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0434\u043b\u044f worker-\u043d\u043e\u0434\u044b (\u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0443\u043d\u043a\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f master-\u0443\u0437\u043b\u0430).<\/p>\n<\/div>\n<\/details>\n<p><strong>UPD 21.10.21 <\/strong>\u041f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b<strong> <\/strong>\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438 \u043d\u0430 <code>CentOS 8<\/code> \u043f\u043e \u044d\u0442\u043e\u0439 <a href=\"https:\/\/upcloud.com\/community\/tutorials\/install-kubernetes-cluster-centos-8\/\">\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438<\/a>. \u041f\u0440\u043e\u0431\u043b\u0435\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0431\u044b\u043b\u043e (\u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 <code>Ubuntu<\/code>), \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043e\u0447\u0435\u043d\u044c \u0434\u0430\u0436\u0435 \u0440\u0430\u0431\u043e\u0447\u0430\u044f. \u041d\u043e \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0443 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u043e\u0447\u0443 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 Kubernetes \u043d\u0430 CentOS 8.<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441 <code>cat -<\/code>\u043d\u0435\u0440\u0430\u0431\u043e\u0447\u0438\u0435, \u044f \u0438\u0445 \u0442\u0443\u0442 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u043b. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432 \u043f\u0443\u043d\u043a\u0442\u0435 6:<\/p>\n<pre><code>cat &lt;&lt;EOF> \/etc\/sysctl.d\/k8s.conf net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 EOF<\/code><\/pre>\n<p>\u0418 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432 \u043f\u0443\u043d\u043a\u0442\u0435 1 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0430:<\/p>\n<pre><code>cat &lt;&lt;EOF> \/etc\/yum.repos.d\/kubernetes.repo [kubernetes] name=Kubernetes baseurl=https:\/\/packages.cloud.google.com\/yum\/repos\/kubernetes-el7-\\$basearch enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https:\/\/packages.cloud.google.com\/yum\/doc\/yum-key.gpg https:\/\/packages.cloud.google.com\/yum\/doc\/rpm-package-key.gpg exclude=kubelet kubeadm kubectl EOF<\/code><\/pre>\n<p>\u041e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 &#8212; \u0432 \u044d\u0442\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u0434\u043e\u0432\u0435\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0445\u043e\u0441\u0442\u044b. \u0415\u0441\u043b\u0438 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0447\u0438\u0441\u0442\u043e \u043f\u043e \u0441\u0442\u0430\u0442\u044c\u0435, \u0442\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043e ingress-nginx (\u043b\u0438\u0447\u043d\u043e \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u043e\u0441\u0442\u043e <a href=\"https:\/\/linuxconfig.org\/redhat-8-stop-start-firewall\">\u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c<\/a> \u0444\u0430\u0435\u0440\u0432\u043e\u043b (\u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c dev \u043a\u043b\u0430\u0441\u0442\u0435\u0440).<\/p>\n<p>\u0418 \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 Ubuntu \u043d\u0430 CentOS 8 \u044f \u0441\u043c\u043e\u0433 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0430\u043c\u0443\u044e \u043a\u0440\u0430\u0439\u043d\u044e\u044e (1.22.2) \u0432\u0435\u0440\u0441\u0438\u044e \u043a\u0443\u0431\u0430.<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e! \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 Kubernetes \u043a\u043b\u0430\u0441\u0442\u0435\u0440! <a href=\"#0\">\u2191<\/a><\/p>\n<p><a class=\"anchor\" name=\"2\" id=\"2\"><\/a><\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Helm<\/h3>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0432\u0437\u044f\u0442\u0430 \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e <a href=\"https:\/\/helm.sh\/docs\/intro\/install\/\">\u0441\u0430\u0439\u0442\u0430<\/a> \u0434\u043b\u044f Ubuntu.<\/p>\n<pre><code class=\"bash\">curl https:\/\/baltocdn.com\/helm\/signing.asc | sudo apt-key add - sudo apt-get install apt-transport-https --yes echo \"deb https:\/\/baltocdn.com\/helm\/stable\/debian\/ all main\" | sudo tee \/etc\/apt\/sources.list.d\/helm-stable-debian.list sudo apt-get update sudo apt-get install helm<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438:<\/p>\n<pre><code class=\"bash\">helm version<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<details class=\"spoiler\">\n<summary>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0434\u043b\u044f CentOS 8. <\/summary>\n<div class=\"spoiler__content\">\n<p>\u0422\u043e\u0436\u0435 \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e <a href=\"https:\/\/helm.sh\/docs\/intro\/install\/#from-script\">\u0441\u0430\u0439\u0442\u0430<\/a>:<\/p>\n<pre><code class=\"bash\">curl -fsSL -o get_helm.sh https:\/\/raw.githubusercontent.com\/helm\/helm\/main\/scripts\/get-helm-3 chmod 700 get_helm.sh .\/get_helm.sh<\/code><\/pre>\n<\/div>\n<\/details>\n<p>Helm \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d! <a href=\"#0\">\u2191<\/a><\/p>\n<p><a class=\"anchor\" name=\"3\" id=\"3\"><\/a><\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Ingress-nginx<\/h3>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0441\u0442\u044f\u043d\u0443\u043b \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 <a href=\"https:\/\/kubernetes.github.io\/ingress-nginx\/deploy\/#using-helm\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<pre><code class=\"bash\">helm repo add ingress-nginx https:\/\/kubernetes.github.io\/ingress-nginx  helm repo update  helm install ingress-nginx ingress-nginx\/ingress-nginx<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b:<\/p>\n<pre><code>kubectl get svc<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0431\u044b \u0432\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c <strong>GKE<\/strong> \u0438\u043b\u0438 <strong>AWS<\/strong>, \u0442\u043e \u0432 \u0433\u0440\u0430\u0444\u0435 <code>EXTERNAL-IP<\/code> \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0431\u044b \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 IP-\u0430\u0434\u0440\u0435\u0441. <\/p>\n<p>\u0410 Ingress-\u0441\u0435\u0440\u0432\u0438\u0441 \u0441\u0442\u0430\u043b \u0431\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443: <code>http:\/\/*external-ip*:80<\/code><\/p>\n<figure class=\"full-width\"><figcaption>\u0412 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 &#171;Kubernetes-as-a-service&#187; \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u0430 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u2014 Cloud Load Balancer.<\/figcaption><\/figure>\n<p>\u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0435 \u041a\u0443\u0431 \u043d\u0430 \u0433\u043e\u043b\u043e\u0435 \u0436\u0435\u043b\u0435\u0437\u043e, \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043b\u0443\u0436\u0431\u044b \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 EXTERNAL-IP. \u042d\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 <a href=\"https:\/\/kubernetes.github.io\/ingress-nginx\/deploy\/baremetal\/#bare-metal-considerations\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a> \u043a Ingress-nginx (\u044d\u0442\u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0441\u0442\u044f\u043d\u0443\u043b \u043e\u0442\u0442\u0443\u0434\u0430 \u0436\u0435), \u0430 \u0442\u0430\u043a\u0436\u0435 <a href=\"https:\/\/docs.gitlab.com\/ee\/topics\/autodevops\/requirements.html#auto-devops-requirements-for-bare-metal\">\u0442\u0443\u0442<\/a>.<\/p>\n<figure class=\"full-width\"><figcaption>\u0412 &#171;bare-metal&#187; \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u044d\u0442\u0430<\/figcaption><\/figure>\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-381941","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/381941","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=381941"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/381941\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=381941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=381941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=381941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}