{"id":344019,"date":"2023-01-16T21:00:54","date_gmt":"2023-01-16T21:00:54","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=344019"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=344019","title":{"rendered":"<span>Kubernetes \u0447\u0435\u0440\u0435\u0437 \u0433\u0440\u0430\u0431\u043b\u0438 \u0438\u043b\u0438 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u0432 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0435<\/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\/w1560\/getpro\/habr\/upload_files\/936\/42d\/7ff\/93642d7ff34de28f62f907736946c849.png\" width=\"720\" height=\"540\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/936\/42d\/7ff\/93642d7ff34de28f62f907736946c849.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0434\u043e\u043b\u0433\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432 \u00ab\u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u00bb \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u044b\u043b \u0447\u0435\u0440\u0435\u0437 \u0430\u0440\u0445\u0438\u0432\u044b \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u0447\u0435\u0440\u0435\u0437 ftp \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0438\u0441\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u0418 \u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0431\u044b\u043b\u0430 \u0441\u0432\u043e\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430. \u0420\u0435\u0441\u0443\u0440\u0441\u044b \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043d\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e. \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u043f\u043e\u0434 \u0432\u0441\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u043d\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u043b\u0435\u0433 \u043d\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u0438 \u044d\u0442\u0438\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u041a Kubernetes \u043c\u044b \u043f\u0440\u0438\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0434\u0432\u0430 \u0433\u043e\u0434\u0430. \u0418\u0437\u0443\u0447\u0430\u043b\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u0435\u0433\u043e \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c, \u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043b\u0438 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435. \u041f\u043e\u043a\u0430 \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u043c\u044b \u043d\u0435 \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440. \u0414\u043b\u044f \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0431\u044b\u043b\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 Docker Swarm, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0430 \u043f\u0440\u043e\u0449\u0435, \u0438 \u0442\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u2013 \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0431\u044b\u043b\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f, \u0430 Docker Swarm \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0441\u0435\u0441\u0441\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0434\u043d\u043e\u0433\u043e (\u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 ADFS \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435) \u2013 \u0442.\u0435. \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0435\u0441\u0441\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u043b\u0430\u0441\u044c \u0438 \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u0430 \u0441\u0442\u0440\u0430\u0442\u043e\u0432\u0430\u044f. \u041f\u043e\u0438\u0441\u043a \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0441\u0432\u043e\u0434\u0438\u043b \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u2013 \u043d\u0443\u0436\u0435\u043d Kubernetes \u0441 \u0435\u0433\u043e Ingress \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u00ab\u043b\u0438\u043f\u043a\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438\u00bb (sticky session). \u041f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u00ab\u0432\u0430\u043d\u0438\u043b\u044c\u043d\u044b\u0439\u00bb k8s.<\/p>\n<p>\u0412 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0440\u0430\u0437 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432 Kubernetes \u043d\u0430\u0447\u0430\u043b\u0441\u044f \u043f\u043e\u0438\u0441\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u043a \u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0443\u0434\u0430 \u043d\u0430\u0448 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440. \u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0438\u0441\u044c \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u043b\u0438\u0441\u044c \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 Docker Container Registry, \u0430 \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0432 Kubernetes \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f Gitlab Runner \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440\u0435. \u041d\u0435 \u0441\u0430\u043c\u043e\u0435 \u043b\u0443\u0447\u0448\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043d\u043e \u043a\u043e\u043c\u043f\u0435\u0442\u0435\u043d\u0446\u0438\u0439 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e. \u0418 \u0432\u043e\u0442 \u043a\u043e\u0433\u0434\u0430 Deployment \u0431\u044b\u043b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a \u0432\u043e\u043f\u0440\u043e\u0441. \u041a\u0430\u043a \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043d\u0430\u0440\u0443\u0436\u0443. \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 Bare Metal \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e, \u0442\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0432 Google \u0432\u044b\u043b\u0435\u0437 Metal LB. \u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u0437\u043d\u0430\u043b\u0438 \u0442\u043e\u0433\u0434\u0430, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Ingress Nginx \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c Host Network: True, \u0442\u043e \u044d\u0442\u043e \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043b\u043e \u0431\u044b \u043d\u0430\u043c \u043c\u0435\u0441\u044f\u0446 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 Metal LB \u0438 \u043c\u044b \u0437\u043d\u0430\u043b\u0438, \u0447\u0442\u043e \u043e\u0442 \u043d\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f. \u0414\u043b\u044f Metal LB \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c L2 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f, \u0433\u0434\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u043b \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0438\u0434\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u0410 \u043a\u0430\u043a \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u044d\u0442\u043e \u043d\u0430\u0440\u0443\u0436\u0443? \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Nginx \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440 \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u0432 \/etc\/hosts, \u0447\u0442\u043e\u0431\u044b Nginx \u0438\u0445 \u0432\u0438\u0434\u0435\u043b. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e \u0432 \u0433\u043e\u043b\u043e\u0432\u0435 \u0442\u043e\u0433\u0434\u0430 \u0431\u044b\u043b\u0430 \u043c\u044b\u0441\u043b\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u043a\u0430\u043a-\u0442\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0418 \u043a\u043e\u0433\u0434\u0430 \u0443\u0437\u043d\u0430\u0432 \u043f\u0440\u043e Host Network \u0431\u044b\u043b \u043f\u043e\u0434\u043d\u044f\u043b \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438\u0437 \u0442\u0440\u0451\u0445 \u043c\u0430\u0441\u0442\u0435\u0440\u043e\u0432 \u0438 \u0442\u0440\u0451\u0445 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043d\u043e\u0434 \u0431\u0435\u0437 Metal LB. \u041f\u0440\u0430\u0432\u0434\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0431\u044b\u043b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u0447\u0435\u0440\u0435\u0437 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f user, \u0430 \u043d\u0435 root \u0438 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b Gitlab Runner \u0432\u0438\u0434\u0435\u043b \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u2013 \u0435\u0433\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 user. \u041e\u043f\u044f\u0442\u044c \u0436\u0435 \u0432\u0441\u044f \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u0441\u044b\u043f\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0438\u0434\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u0438\u043d \u043c\u0430\u0441\u0442\u0435\u0440. \u0418 \u043d\u0430\u0447\u0430\u043b\u0438\u0441\u044c \u043f\u043e\u0438\u0441\u043a\u0438 \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0418\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e kubeadm. \u041a\u043b\u0430\u0441\u0442\u0435\u0440 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f 3 master \u0438 3 worker. \u0421\u0435\u0442\u0435\u0432\u043e\u0439 \u043f\u043b\u0430\u0433\u0438\u043d &#8212;\u00a0<a href=\"http:\/\/weave.net\/\" rel=\"noopener noreferrer nofollow\">weave.net<\/a>, \u0430 Ingress \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u044d\u0442\u043e Ingress Nginx \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0439 \u043a\u0430\u043a Daemon Set \u0434\u043b\u044f \u0434\u043b\u044f \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c \u043f\u0440\u0438 \u043e\u0442\u043a\u0430\u0437\u0435 \u043e\u0434\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043d\u043e\u0434\u044b. \u0412 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 Kubernetes \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0441 Stateless \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0441\u0432\u043e\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 PV \u0442\u043e\u043c\u0430\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u043d\u0430 \u0421\u0425\u0414 \u0447\u0435\u0440\u0435\u0437 NFS provisioner, \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0411\u0414 (MSSQL, MYSQL, PostgreSQL) \u0438 \u043d\u0430 S3 Minio. CI\/CD \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043d\u0430 \u0431\u0430\u0437\u0435 Gitlab \u0441\u043e\u00a0\u0441\u0431\u043e\u0440\u043e\u043c \u0434\u043e\u043a\u0435\u0440 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0412\u041c \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u0438\u0445 \u0447\u0435\u0440\u0435\u0437 gitlab-agent \u0438 gitlab-runner \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 Kubernetes.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2ac\/3ad\/a23\/2ac3ada2357160c84ec5cec40dec0aae.png\" alt=\"\u0418\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f\" title=\"\u0418\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f\" width=\"1260\" height=\"319\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2ac\/3ad\/a23\/2ac3ada2357160c84ec5cec40dec0aae.png\"\/><figcaption>\u0418\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f<\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2da\/329\/122\/2da32912218d9458fe51bd9df8c5ba1c.png\" alt=\"\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f Rolling Update \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f ID pipeline \u0438 \u0438\u043c\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 Deployment \u0447\u0435\u0440\u0435\u0437 sed.\" title=\"\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f Rolling Update \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f ID pipeline \u0438 \u0438\u043c\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 Deployment \u0447\u0435\u0440\u0435\u0437 sed.\" width=\"911\" height=\"411\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2da\/329\/122\/2da32912218d9458fe51bd9df8c5ba1c.png\"\/><figcaption>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f Rolling Update \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f ID pipeline \u0438 \u0438\u043c\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 Deployment \u0447\u0435\u0440\u0435\u0437 sed.<\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/674\/afc\/297\/674afc297cbf075f323def6ea3903bb0.png\" alt=\"\u0414\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Prometheus.\" title=\"\u0414\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Prometheus.\" width=\"819\" height=\"911\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/674\/afc\/297\/674afc297cbf075f323def6ea3903bb0.png\"\/><figcaption>\u0414\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Prometheus.<\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b42\/684\/6ce\/b426846ce90c2c89beb27a8787b9ff74.png\" alt=\"\u041d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432 Kubernetes \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 10 \u0441\u0430\u043c\u043e\u043f\u0438\u0441\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 6 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445.\" title=\"\u041d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432 Kubernetes \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 10 \u0441\u0430\u043c\u043e\u043f\u0438\u0441\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 6 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445.\" width=\"1345\" height=\"807\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b42\/684\/6ce\/b426846ce90c2c89beb27a8787b9ff74.png\"\/><figcaption>\u041d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432 Kubernetes \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 10 \u0441\u0430\u043c\u043e\u043f\u0438\u0441\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 6 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445.<\/figcaption><\/figure>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432 \u043b\u0438\u0448\u044c \u0447\u0430\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 Kubernetes \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u044e \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c \u0438\u0437 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b. \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u00ab\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u00bb \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0433\u0434\u0435 \u043b\u0438\u0448\u044c \u043d\u0430\u0434\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c Docker \u043e\u0431\u0440\u0430\u0437 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0447\u0442\u043e \u043e\u043d \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f. \u0417\u0430 Kubernetes \u0431\u0443\u0434\u0443\u0449\u0435\u0435.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/711008\/\"> https:\/\/habr.com\/ru\/post\/711008\/<\/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>\u041d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0434\u043e\u043b\u0433\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432 \u00ab\u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u00bb \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u044b\u043b \u0447\u0435\u0440\u0435\u0437 \u0430\u0440\u0445\u0438\u0432\u044b \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u0447\u0435\u0440\u0435\u0437 ftp \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0438\u0441\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u0418 \u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0431\u044b\u043b\u0430 \u0441\u0432\u043e\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430. \u0420\u0435\u0441\u0443\u0440\u0441\u044b \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043d\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e. \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u043f\u043e\u0434 \u0432\u0441\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u043d\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u043b\u0435\u0433 \u043d\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u0438 \u044d\u0442\u0438\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u041a Kubernetes \u043c\u044b \u043f\u0440\u0438\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0434\u0432\u0430 \u0433\u043e\u0434\u0430. \u0418\u0437\u0443\u0447\u0430\u043b\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u0435\u0433\u043e \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c, \u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043b\u0438 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435. \u041f\u043e\u043a\u0430 \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u043c\u044b \u043d\u0435 \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440. \u0414\u043b\u044f \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0431\u044b\u043b\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 Docker Swarm, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0430 \u043f\u0440\u043e\u0449\u0435, \u0438 \u0442\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u2013 \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0431\u044b\u043b\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f, \u0430 Docker Swarm \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0441\u0435\u0441\u0441\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0434\u043d\u043e\u0433\u043e (\u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 ADFS \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435) \u2013 \u0442.\u0435. \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0435\u0441\u0441\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u043b\u0430\u0441\u044c \u0438 \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u0430 \u0441\u0442\u0440\u0430\u0442\u043e\u0432\u0430\u044f. \u041f\u043e\u0438\u0441\u043a \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0441\u0432\u043e\u0434\u0438\u043b \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u2013 \u043d\u0443\u0436\u0435\u043d Kubernetes \u0441 \u0435\u0433\u043e Ingress \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u00ab\u043b\u0438\u043f\u043a\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438\u00bb (sticky session). \u041f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u00ab\u0432\u0430\u043d\u0438\u043b\u044c\u043d\u044b\u0439\u00bb k8s.<\/p>\n<p>\u0412 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0440\u0430\u0437 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432 Kubernetes \u043d\u0430\u0447\u0430\u043b\u0441\u044f \u043f\u043e\u0438\u0441\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u043a \u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0443\u0434\u0430 \u043d\u0430\u0448 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440. \u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0438\u0441\u044c \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u043b\u0438\u0441\u044c \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 Docker Container Registry, \u0430 \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0432 Kubernetes \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f Gitlab Runner \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440\u0435. \u041d\u0435 \u0441\u0430\u043c\u043e\u0435 \u043b\u0443\u0447\u0448\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043d\u043e \u043a\u043e\u043c\u043f\u0435\u0442\u0435\u043d\u0446\u0438\u0439 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e. \u0418 \u0432\u043e\u0442 \u043a\u043e\u0433\u0434\u0430 Deployment \u0431\u044b\u043b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a \u0432\u043e\u043f\u0440\u043e\u0441. \u041a\u0430\u043a \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043d\u0430\u0440\u0443\u0436\u0443. \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 Bare Metal \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e, \u0442\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0432 Google \u0432\u044b\u043b\u0435\u0437 Metal LB. \u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u0437\u043d\u0430\u043b\u0438 \u0442\u043e\u0433\u0434\u0430, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Ingress Nginx \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c Host Network: True, \u0442\u043e \u044d\u0442\u043e \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043b\u043e \u0431\u044b \u043d\u0430\u043c \u043c\u0435\u0441\u044f\u0446 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 Metal LB \u0438 \u043c\u044b \u0437\u043d\u0430\u043b\u0438, \u0447\u0442\u043e \u043e\u0442 \u043d\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f. \u0414\u043b\u044f Metal LB \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c L2 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f, \u0433\u0434\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u043b \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0438\u0434\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u0410 \u043a\u0430\u043a \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u044d\u0442\u043e \u043d\u0430\u0440\u0443\u0436\u0443? \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Nginx \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440 \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u0432 \/etc\/hosts, \u0447\u0442\u043e\u0431\u044b Nginx \u0438\u0445 \u0432\u0438\u0434\u0435\u043b. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e \u0432 \u0433\u043e\u043b\u043e\u0432\u0435 \u0442\u043e\u0433\u0434\u0430 \u0431\u044b\u043b\u0430 \u043c\u044b\u0441\u043b\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u043a\u0430\u043a-\u0442\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0418 \u043a\u043e\u0433\u0434\u0430 \u0443\u0437\u043d\u0430\u0432 \u043f\u0440\u043e Host Network \u0431\u044b\u043b \u043f\u043e\u0434\u043d\u044f\u043b \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438\u0437 \u0442\u0440\u0451\u0445 \u043c\u0430\u0441\u0442\u0435\u0440\u043e\u0432 \u0438 \u0442\u0440\u0451\u0445 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043d\u043e\u0434 \u0431\u0435\u0437 Metal LB. \u041f\u0440\u0430\u0432\u0434\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0431\u044b\u043b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u0447\u0435\u0440\u0435\u0437 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f user, \u0430 \u043d\u0435 root \u0438 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b Gitlab Runner \u0432\u0438\u0434\u0435\u043b \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u2013 \u0435\u0433\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 user. \u041e\u043f\u044f\u0442\u044c \u0436\u0435 \u0432\u0441\u044f \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u0441\u044b\u043f\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0438\u0434\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u0438\u043d \u043c\u0430\u0441\u0442\u0435\u0440. \u0418 \u043d\u0430\u0447\u0430\u043b\u0438\u0441\u044c \u043f\u043e\u0438\u0441\u043a\u0438 \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0418\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e kubeadm. \u041a\u043b\u0430\u0441\u0442\u0435\u0440 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f 3 master \u0438 3 worker. \u0421\u0435\u0442\u0435\u0432\u043e\u0439 \u043f\u043b\u0430\u0433\u0438\u043d &#8212;\u00a0<a href=\"http:\/\/weave.net\/\" rel=\"noopener noreferrer nofollow\">weave.net<\/a>, \u0430 Ingress \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u044d\u0442\u043e Ingress Nginx \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0439 \u043a\u0430\u043a Daemon Set \u0434\u043b\u044f \u0434\u043b\u044f \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c \u043f\u0440\u0438 \u043e\u0442\u043a\u0430\u0437\u0435 \u043e\u0434\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043d\u043e\u0434\u044b. \u0412 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 Kubernetes \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0441 Stateless \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0441\u0432\u043e\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 PV \u0442\u043e\u043c\u0430\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u043d\u0430 \u0421\u0425\u0414 \u0447\u0435\u0440\u0435\u0437 NFS provisioner, \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0411\u0414 (MSSQL, MYSQL, PostgreSQL) \u0438 \u043d\u0430 S3 Minio. CI\/CD \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043d\u0430 \u0431\u0430\u0437\u0435 Gitlab \u0441\u043e\u00a0\u0441\u0431\u043e\u0440\u043e\u043c \u0434\u043e\u043a\u0435\u0440 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0412\u041c \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u0438\u0445 \u0447\u0435\u0440\u0435\u0437 gitlab-agent \u0438 gitlab-runner \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 Kubernetes.<\/p>\n<figure class=\"full-width\"><figcaption>\u0418\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f<\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f Rolling Update \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f ID pipeline \u0438 \u0438\u043c\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 Deployment \u0447\u0435\u0440\u0435\u0437 sed.<\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption>\u0414\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Prometheus.<\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption>\u041d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432 Kubernetes \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 10 \u0441\u0430\u043c\u043e\u043f\u0438\u0441\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 6 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445.<\/figcaption><\/figure>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432 \u043b\u0438\u0448\u044c \u0447\u0430\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 Kubernetes \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u044e \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c \u0438\u0437 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b. \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u00ab\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u00bb \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0433\u0434\u0435 \u043b\u0438\u0448\u044c \u043d\u0430\u0434\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c Docker \u043e\u0431\u0440\u0430\u0437 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0447\u0442\u043e \u043e\u043d \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f. \u0417\u0430 Kubernetes \u0431\u0443\u0434\u0443\u0449\u0435\u0435.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/711008\/\"> https:\/\/habr.com\/ru\/post\/711008\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-344019","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/344019","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=344019"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/344019\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=344019"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=344019"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=344019"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}