{"id":303979,"date":"2020-05-21T09:00:28","date_gmt":"2020-05-21T09:00:28","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=303979"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=303979","title":{"rendered":"\u041d\u0430\u0448 \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 etcd Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e (\u0431\u0435\u0437 K8s API)"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/501956\/\">\u0412\u0441\u0435 \u0447\u0430\u0449\u0435 \u043a \u043d\u0430\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u0441 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0432 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0434\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430: \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0443, \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u2026<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ri\/mh\/du\/rimhduzpzbuwtylhnil4dorhzw4.png\"><\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u0441\u043e \u0441\u0432\u043e\u0435\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443 <code>memcached.staging.svc.cluster.local<\/code>. \u041c\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0430\u043a\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e VPN \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0430\u043d\u043e\u043d\u0441\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u0434\u0441\u0435\u0442\u0438 pod&#8217;\u043e\u0432, \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 push&#8217;\u0438\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0435 DNS \u043a\u043b\u0438\u0435\u043d\u0442\u0443. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443 <code>memcached.staging.svc.cluster.local<\/code>, \u0437\u0430\u043f\u0440\u043e\u0441 \u0443\u0445\u043e\u0434\u0438\u0442 \u0432 DNS \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438 \u0432 \u043e\u0442\u0432\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0430\u0434\u0440\u0435\u0441 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0438\u0437 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438\u043b\u0438 \u0430\u0434\u0440\u0435\u0441 pod&#8217;\u0430. <\/p>\n<p>  K8s-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e kubeadm, \u0433\u0434\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u0430\u044f \u043f\u043e\u0434\u0441\u0435\u0442\u044c \u2014 <code>192.168.0.0\/16<\/code>, \u0430 \u0441\u0435\u0442\u044c pod&#8217;\u043e\u0432 \u2014 <code>10.244.0.0\/16<\/code>. \u041e\u0431\u044b\u0447\u043d\u043e \u0432\u0441\u0451 \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432:<a name=\"habracut\"><\/a><\/p>\n<ul>\n<li> \u041f\u043e\u0434\u0441\u0435\u0442\u044c <code>192.168.*.*<\/code> \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043e\u0444\u0438\u0441\u043d\u044b\u0445 \u0441\u0435\u0442\u044f\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0430 \u0435\u0449\u0435 \u0447\u0430\u0449\u0435 \u2014 \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0441\u0435\u0442\u044f\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432. \u0418 \u0442\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b: \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0435 \u0440\u043e\u0443\u0442\u0435\u0440\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 \u044d\u0442\u043e\u0439 \u043f\u043e\u0434\u0441\u0435\u0442\u0438 \u0438 VPN push&#8217;\u0438\u0442 \u044d\u0442\u0438 \u043f\u043e\u0434\u0441\u0435\u0442\u0438 \u0438\u0437 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0443.<\/li>\n<li> \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432 (\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b production, stage \u0438\/\u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e dev-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432). \u0422\u043e\u0433\u0434\u0430 \u0432\u043e \u0432\u0441\u0435\u0445 \u043d\u0438\u0445 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0431\u0443\u0434\u0443\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u043f\u043e\u0434\u0441\u0435\u0442\u0438 \u0434\u043b\u044f pod&#8217;\u043e\u0432 \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u0445.<\/li>\n<\/ul>\n<p>  \u041c\u044b \u0443\u0436\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u0430\u0432\u043d\u043e \u043f\u0440\u0438\u043d\u044f\u043b\u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u043e\u0434\u0441\u0435\u0442\u0435\u0439 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 pod&#8217;\u043e\u0432 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u2014 \u0432 \u043e\u0431\u0449\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b \u0431\u044b\u043b\u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0441\u0435\u0442\u044f\u043c\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u0435\u0440\u0435\u043a\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441 \u043d\u0443\u043b\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043d\u0438\u0445 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b \u043c\u043d\u043e\u0433\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b, stateful-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0442.\u043f.<\/p>\n<p>  \u0418 \u0442\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u0434\u0430\u043b\u0438\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c: \u043a\u0430\u043a \u0431\u044b \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0434\u0441\u0435\u0442\u044c \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435?<\/p>\n<h2>\u041f\u043e\u0438\u0441\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u0439<\/h2>\n<p>  \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 \u2014 \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u0442\u044c <b>\u0432\u0441\u0435<\/b> \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0441 \u0442\u0438\u043f\u043e\u043c ClusterIP. \u041a\u0430\u043a \u0432\u0430\u0440\u0438\u0430\u043d\u0442, <a href=\"https:\/\/www.devops.buzz\/public\/kubeadm\/change-servicesubnet-cidr\">\u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u0442\u044c<\/a> \u0438 \u0442\u0430\u043a\u043e\u0435:<\/p>\n<blockquote><p>The following process has a problem: after everything configured, the pods come up with the old IP as a DNS nameserver in \/etc\/resolv.conf.<br \/>  Since I still did not find the solution, i had to reset the entire cluster with kubeadm reset and init it again.<\/p><\/blockquote>\n<p>  \u041d\u043e \u043d\u0435 \u0432\u0441\u0435\u043c \u044d\u0442\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442\u2026 \u0412\u043e\u0442 \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0432\u043e\u0434\u043d\u044b\u0435 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f: <\/p>\n<ul>\n<li> \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Flannel;<\/li>\n<li> \u0415\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043a\u0430\u043a \u0432 \u043e\u0431\u043b\u0430\u043a\u0430\u0445, \u0442\u0430\u043a \u0438 \u043d\u0430 \u0436\u0435\u043b\u0435\u0437\u0435;<\/li>\n<li> \u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0434\u0435\u043f\u043b\u043e\u044f \u0432\u0441\u0435\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435;<\/li>\n<li> \u0415\u0441\u0442\u044c \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u0432\u043e\u043e\u0431\u0449\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c;<\/li>\n<li> \u0412\u0435\u0440\u0441\u0438\u044f Kubernetes \u2014 1.16.6 (\u0432\u043f\u0440\u043e\u0447\u0435\u043c, \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b \u0438 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439);<\/li>\n<li> \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435, \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e kubeadm \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0439 \u043f\u043e\u0434\u0441\u0435\u0442\u044c\u044e <code>192.168.0.0\/16<\/code>, \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0451 \u043d\u0430 <code>172.24.0.0\/16<\/code>.<\/li>\n<\/ul>\n<p>  \u0418 \u0442\u0430\u043a \u0443\u0436 \u0441\u043e\u0432\u043f\u0430\u043b\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u0434\u0430\u0432\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u0432 Kubernetes \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 etcd, \u0447\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0441 \u044d\u0442\u0438\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c\u2026 \u0412\u043e\u0442 \u0438 \u043f\u043e\u0434\u0443\u043c\u0430\u043b\u0438: \u00ab<b>\u041f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 etcd, \u0437\u0430\u043c\u0435\u043d\u0438\u0432 \u0441\u0442\u0430\u0440\u044b\u0435 IP-\u0430\u0434\u0440\u0435\u0441\u0430 (\u043f\u043e\u0434\u0441\u0435\u0442\u044c) \u043d\u0430 \u043d\u043e\u0432\u044b\u0435<\/b>?\u00bb<\/p>\n<p>  \u041f\u043e\u0438\u0441\u043a\u0430\u0432 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 etcd, \u043c\u044b \u043d\u0435 \u043d\u0430\u0448\u043b\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0435\u0448\u0430\u044e\u0449\u0435\u0433\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443. <i>(\u041a\u0441\u0442\u0430\u0442\u0438, \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435 \u043e \u043b\u044e\u0431\u044b\u0445 \u0443\u0442\u0438\u043b\u0438\u0442\u0430\u0445 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 etcd \u2014 \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u044b \u0437\u0430 \u0441\u0441\u044b\u043b\u043a\u0438.)<\/i> \u041e\u0434\u043d\u0430\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0441\u0442\u0430\u043b\u0430 <a href=\"https:\/\/github.com\/openshift\/origin\/tree\/master\/tools\/etcdhelper\"><b>etcdhelper<\/b> \u043e\u0442 OpenShift<\/a> <i>(\u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0435\u0433\u043e \u0430\u0432\u0442\u043e\u0440\u0430\u043c!)<\/i>.<\/p>\n<p>  \u042d\u0442\u0430 \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0443\u043c\u0435\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a etcd \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0438 \u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0442\u0442\u0443\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434 <code>ls<\/code>, <code>get<\/code>, <code>dump<\/code>.<\/p>\n<h3>\u0414\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c etcdhelper<\/h3>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043c\u044b\u0441\u043b\u044c \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u0430: \u00ab\u0427\u0442\u043e \u043c\u0435\u0448\u0430\u0435\u0442 \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u0443 \u0443\u0442\u0438\u043b\u0438\u0442\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 etcd?\u00bb<\/p>\n<p>  \u041e\u043d\u0430 \u0432\u043e\u043f\u043b\u043e\u0442\u0438\u043b\u0430\u0441\u044c \u0432 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e etcdhelper \u0441 \u0434\u0432\u0443\u043c\u044f \u043d\u043e\u0432\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 <code>changeServiceCIDR<\/code> \u0438 <code>changePodCIDR<\/code>. \u041d\u0430 \u0435\u0451 <b>\u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/github.com\/flant\/examples\/blob\/master\/2020\/04-etcdhelper\">\u0437\u0434\u0435\u0441\u044c<\/a><\/b>.<\/p>\n<p>  \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u044e\u0442 \u043d\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438? \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c <code>changeServiceCIDR<\/code>:<\/p>\n<ul>\n<li> \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440;<\/li>\n<li> \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0437\u0430\u043c\u0435\u043d\u044b CIDR;<\/li>\n<li> \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c \u043f\u043e \u0432\u0441\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0441 \u0442\u0438\u043f\u043e\u043c ClusterIP \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435:\n<ul>\n<li> \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 etcd \u0432 Go-\u043e\u0431\u044a\u0435\u043a\u0442;<\/li>\n<li> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0430 \u0431\u0430\u0439\u0442\u0430 \u0430\u0434\u0440\u0435\u0441\u0430;<\/li>\n<li> \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0443 IP-\u0430\u0434\u0440\u0435\u0441 \u0438\u0437 \u043d\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u0441\u0435\u0442\u0438;<\/li>\n<li> \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c Go-\u043e\u0431\u044a\u0435\u043a\u0442 \u0432 protobuf, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 etcd.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>changePodCIDR<\/code> \u043f\u043e \u0441\u0443\u0442\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430 <code>changeServiceCIDR<\/code> \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0434\u043b\u044f \u0443\u0437\u043b\u0430 \u0438 \u043c\u0435\u043d\u044f\u0435\u043c <code>.spec.PodCIDR<\/code> \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u043f\u043e\u0434\u0441\u0435\u0442\u044c.<\/p>\n<h2>\u041f\u0440\u0430\u043a\u0442\u0438\u043a\u0430<\/h2>\n<p>  <\/p>\n<h3>\u0421\u043c\u0435\u043d\u0430 serviceCIDR<\/h3>\n<p>  \u041f\u043b\u0430\u043d \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u2014 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043d\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0434\u0430\u0443\u043d\u0442\u0430\u0439\u043c \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0445 pod&#8217;\u043e\u0432 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435. \u041f\u043e\u0441\u043b\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0448\u0430\u0433\u043e\u0432 \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u043c\u0441\u044f \u043c\u044b\u0441\u043b\u044f\u043c\u0438, \u043a\u0430\u043a \u0432 \u0442\u0435\u043e\u0440\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439.<\/p>\n<p>  \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:<\/p>\n<ul>\n<li> \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u041f\u041e \u0438 \u0441\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u043f\u0430\u0442\u0447\u0435\u043d\u043d\u043e\u0433\u043e etcdhelper;<\/li>\n<li> \u0431\u044d\u043a\u0430\u043f etcd \u0438 <code>\/etc\/kubernetes<\/code>.<\/li>\n<\/ul>\n<p>  \u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u043f\u043b\u0430\u043d \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u043e \u0441\u043c\u0435\u043d\u0435 serviceCIDR:<\/p>\n<ul>\n<li> \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u0432 apiserver&#8217;\u0430 \u0438 controller-manager&#8217;\u0430;<\/li>\n<li> \u043f\u0435\u0440\u0435\u0432\u044b\u043f\u0443\u0441\u043a \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432;<\/li>\n<li> \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 ClusterIP \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0432 etcd;<\/li>\n<li> \u0440\u0435\u0441\u0442\u0430\u0440\u0442 \u0432\u0441\u0435\u0445 pod&#8217;\u043e\u0432 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435.<\/li>\n<\/ul>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u043b\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0432 \u0434\u0435\u0442\u0430\u043b\u044f\u0445.<\/p>\n<p>  1. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c etcd-client \u0434\u043b\u044f \u0434\u0430\u043c\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"bash\">apt install etcd-client<\/code><\/pre>\n<p>  2. \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c etcdhelper:<\/p>\n<ul>\n<li> \u0421\u0442\u0430\u0432\u0438\u043c golang:\n<pre><code class=\"bash\">GOPATH=\/root\/golang mkdir -p $GOPATH\/local curl -sSL https:\/\/dl.google.com\/go\/go1.14.1.linux-amd64.tar.gz | tar -xzvC $GOPATH\/local echo &quot;export GOPATH=\\&quot;$GOPATH\\&quot;&quot; &gt;&gt; ~\/.bashrc echo 'export GOROOT=&quot;$GOPATH\/local\/go&quot;' &gt;&gt; ~\/.bashrc echo 'export PATH=&quot;$PATH:$GOPATH\/local\/go\/bin&quot;' &gt;&gt; ~\/.bashrc<\/code><\/pre>\n<\/li>\n<li> \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0441\u0435\u0431\u0435 <code>etcdhelper.go<\/code>, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c:\n<pre><code class=\"bash\">wget https:\/\/raw.githubusercontent.com\/flant\/examples\/master\/2020\/04-etcdhelper\/etcdhelper.go go get go.etcd.io\/etcd\/clientv3 k8s.io\/kubectl\/pkg\/scheme k8s.io\/apimachinery\/pkg\/runtime go build -o etcdhelper etcdhelper.go<\/code><\/pre>\n<\/li>\n<\/ul>\n<p>  3. \u0414\u0435\u043b\u0430\u0435\u043c \u0431\u044d\u043a\u0430\u043f etcd:<\/p>\n<pre><code class=\"bash\">backup_dir=\/root\/backup mkdir ${backup_dir} cp -rL \/etc\/kubernetes ${backup_dir} ETCDCTL_API=3 etcdctl --cacert=\/etc\/kubernetes\/pki\/etcd\/ca.crt --key=\/etc\/kubernetes\/pki\/etcd\/server.key --cert=\/etc\/kubernetes\/pki\/etcd\/server.crt --endpoints https:\/\/192.168.199.100:2379 snapshot save ${backup_dir}\/etcd.snapshot<\/code><\/pre>\n<p>  4. \u041c\u0435\u043d\u044f\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u0443\u044e \u043f\u043e\u0434\u0441\u0435\u0442\u044c \u0432 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430\u0445 Kubernetes control plane. \u0412 \u0444\u0430\u0439\u043b\u0430\u0445 <code>\/etc\/kubernetes\/manifests\/kube-apiserver.yaml<\/code> \u0438 <code>\/etc\/kubernetes\/manifests\/kube-controller-manager.yaml<\/code> \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>--service-cluster-ip-range<\/code> \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u043f\u043e\u0434\u0441\u0435\u0442\u044c: <code>172.24.0.0\/16<\/code> \u0432\u043c\u0435\u0441\u0442\u043e <code>192.168.0.0\/16<\/code>.<\/p>\n<p>  5. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u0443\u044e \u043f\u043e\u0434\u0441\u0435\u0442\u044c, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e kubeadm \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u0434\u043b\u044f apiserver\u2019\u0430 (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435), \u0438\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442\u044c:<\/p>\n<ol>\n<li> \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043d\u0430 \u043a\u0430\u043a\u0438\u0435 \u0434\u043e\u043c\u0435\u043d\u044b \u0438 IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0432\u044b\u043f\u0443\u0449\u0435\u043d \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442:\n<pre><code class=\"bash\">openssl x509 -noout -ext subjectAltName &lt;\/etc\/kubernetes\/pki\/apiserver.crt X509v3 Subject Alternative Name:     DNS:dev-1-master, DNS:kubernetes, DNS:kubernetes.default, DNS:kubernetes.default.svc, DNS:kubernetes.default.svc.cluster.local, DNS:apiserver, IP Address:192.168.0.1, IP Address:10.0.0.163, IP Address:192.168.199.100<\/code><\/pre>\n<\/li>\n<li> \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 \u0434\u043b\u044f kubeadm:\n<pre><code class=\"bash\">cat kubeadm-config.yaml apiVersion: kubeadm.k8s.io\/v1beta1 kind: ClusterConfiguration networking:   podSubnet: &quot;10.244.0.0\/16&quot;   serviceSubnet: &quot;172.24.0.0\/16&quot; apiServer:   certSANs:   - &quot;192.168.199.100&quot; # IP-\u0430\u0434\u0440\u0435\u0441 \u043c\u0430\u0441\u0442\u0435\u0440 \u0443\u0437\u043b\u0430<\/code><\/pre>\n<\/li>\n<li> \u0423\u0434\u0430\u043b\u0438\u043c \u0441\u0442\u0430\u0440\u044b\u0435 crt \u0438 key, \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043d\u0435 \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f:\n<pre><code class=\"bash\">rm \/etc\/kubernetes\/pki\/apiserver.{key,crt}<\/code><\/pre>\n<\/li>\n<li> \u041f\u0435\u0440\u0435\u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u0434\u043b\u044f API-\u0441\u0435\u0440\u0432\u0435\u0440\u0430:\n<pre><code class=\"bash\">kubeadm init phase certs apiserver --config=kubeadm-config.yaml<\/code><\/pre>\n<\/li>\n<li> \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u0441\u0435\u0442\u0438:\n<pre><code class=\"bash\">openssl x509 -noout -ext subjectAltName &lt;\/etc\/kubernetes\/pki\/apiserver.crt X509v3 Subject Alternative Name:     DNS:kube-2-master, DNS:kubernetes, DNS:kubernetes.default, DNS:kubernetes.default.svc, DNS:kubernetes.default.svc.cluster.local, IP Address:172.24.0.1, IP Address:10.0.0.163, IP Address:192.168.199.100<\/code><\/pre>\n<\/li>\n<li> \u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0432\u044b\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 API-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440:\n<pre><code class=\"bash\">docker ps | grep k8s_kube-apiserver | awk '{print $1}' | xargs docker restart<\/code><\/pre>\n<\/li>\n<li> \u041f\u0435\u0440\u0435\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u0434\u043b\u044f <code>admin.conf<\/code>:\n<pre><code class=\"bash\">kubeadm alpha certs renew admin.conf<\/code><\/pre>\n<\/li>\n<li> \u041e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 etcd:\n<pre><code class=\"bash\">.\/etcdhelper -cacert \/etc\/kubernetes\/pki\/etcd\/ca.crt -cert \/etc\/kubernetes\/pki\/etcd\/server.crt -key \/etc\/kubernetes\/pki\/etcd\/server.key -endpoint https:\/\/127.0.0.1:2379 change-service-cidr 172.24.0.0\/16 <\/code><\/pre>\n<p>  <b>\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/b> \u0412 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0440\u0435\u0437\u043e\u043b\u0432\u0438\u043d\u0433 \u0434\u043e\u043c\u0435\u043d\u043e\u0432, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 pod&#8217;\u0430\u0445 \u0432 <code>\/etc\/resolv.conf<\/code> \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d \u0441\u0442\u0430\u0440\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 CoreDNS (kube-dns), \u0430 kube-proxy \u0438\u0437\u043c\u0435\u043d\u0438\u043b \u043f\u0440\u0430\u0432\u0438\u043b\u0430 iptables \u0441\u043e \u0441\u0442\u0430\u0440\u043e\u0439 \u043f\u043e\u0434\u0441\u0435\u0442\u0438 \u043d\u0430 \u043d\u043e\u0432\u0443\u044e. \u0414\u0430\u043b\u0435\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u0445 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439.<\/li>\n<li> \u041f\u043e\u043f\u0440\u0430\u0432\u0438\u043c ConfigMap&#8217;\u044b \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d <code>kube-system<\/code>:\n<pre><code class=\"bash\">kubectl -n kube-system edit cm kubelet-config-1.16<\/code><\/pre>\n<p>  \u2014 \u0437\u0434\u0435\u0441\u044c \u0437\u0430\u043c\u0435\u043d\u0438\u043c <code>clusterDNS<\/code> \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 IP-\u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 kube-dns: <code>kubectl -n kube-system get svc kube-dns<\/code>.<\/p>\n<pre><code class=\"bash\">kubectl -n kube-system edit cm kubeadm-config<\/code><\/pre>\n<p>  \u2014 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c <code>data.ClusterConfiguration.networking.serviceSubnet<\/code> \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u043f\u043e\u0434\u0441\u0435\u0442\u044c.<\/li>\n<li> \u0422\u0430\u043a \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u0430\u0434\u0440\u0435\u0441 kube-dns, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433 kubelet \u043d\u0430 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u0430\u0445:\n<pre><code class=\"bash\">kubeadm upgrade node phase kubelet-config &amp;&amp; systemctl restart kubelet<\/code><\/pre>\n<\/li>\n<li> \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0435 pod&#8217;\u044b \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435:\n<pre><code class=\"bash\">kubectl get pods --no-headers=true --all-namespaces |sed -r 's\/(\\S+)\\s+(\\S+).*\/kubectl --namespace \\1 delete pod \\2\/e'<\/code><\/pre>\n<\/li>\n<\/ol>\n<p>  <\/p>\n<h3>\u041c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u044f<\/h3>\n<p>  \u041c\u044b\u0441\u043b\u0438, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u0443\u043d\u0442\u0430\u0439\u043c:<\/p>\n<ol>\n<li> \u041f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u0432 control plane\u2019\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 kube-dns, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>kube-dns-tmp<\/code> \u0438 \u043d\u043e\u0432\u044b\u043c \u0430\u0434\u0440\u0435\u0441\u043e\u043c <code>172.24.0.10<\/code>.<\/li>\n<li> \u0421\u0434\u0435\u043b\u0430\u0442\u044c <code>if<\/code> \u0432 etcdhelper, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 kube-dns.<\/li>\n<li> \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u043e \u0432\u0441\u0435\u0445 kubelet&#8217;\u0430\u0445 \u0430\u0434\u0440\u0435\u0441 <code>ClusterDNS<\/code> \u043d\u0430 \u043d\u043e\u0432\u044b\u0439, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0442\u0430\u0440\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441 \u043d\u043e\u0432\u044b\u043c.<\/li>\n<li> \u0414\u043e\u0436\u0434\u0430\u0442\u044c\u0441\u044f, \u043f\u043e\u043a\u0430 pod&#8217;\u044b \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u0435\u0440\u0435\u043a\u0430\u0442\u044f\u0442\u0441\u044f \u043b\u0438\u0431\u043e \u0441\u0430\u043c\u0438 \u043f\u043e \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c, \u043b\u0438\u0431\u043e \u0432 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f.<\/li>\n<li> \u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 <code>kube-dns-tmp<\/code> \u0438 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c <code>serviceSubnetCIDR<\/code> \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 kube-dns.<\/li>\n<\/ol>\n<p>  \u042d\u0442\u043e\u0442 \u043f\u043b\u0430\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u0443\u043d\u0442\u0430\u0439\u043c \u0434\u043e ~\u043c\u0438\u043d\u0443\u0442\u044b \u2014 \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 <code>kube-dns-tmp<\/code> \u0438 \u0437\u0430\u043c\u0435\u043d\u044b \u043f\u043e\u0434\u0441\u0435\u0442\u0438 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 <code>kube-dns<\/code>.<\/p>\n<h3>\u041c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f podNetwork<\/h3>\n<p>  \u0417\u0430\u043e\u0434\u043d\u043e \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c podNetwork \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0435\u0433\u043e\u0441\u044f etcdhelper&#8217;\u0430. \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439:<\/p>\n<ul>\n<li> \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0432 <code>kube-system<\/code>;<\/li>\n<li> \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 kube-controller-manager&#8217;\u0430;<\/li>\n<li> \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c podCIDR \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 etcd;<\/li>\n<li> \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0432\u0441\u0435 \u0443\u0437\u043b\u044b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/li>\n<\/ul>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u0445:<\/p>\n<p>  1. \u041c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c ConfigMap&#8217;\u044b \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d <code>kube-system<\/code>:<\/p>\n<pre><code class=\"bash\">kubectl -n kube-system edit cm kubeadm-config<\/code><\/pre>\n<p>  \u2014 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c <code>data.ClusterConfiguration.networking.podSubnet<\/code> \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u043f\u043e\u0434\u0441\u0435\u0442\u044c <code>10.55.0.0\/16<\/code>.<\/p>\n<pre><code class=\"bash\">kubectl -n kube-system edit cm kube-proxy<\/code><\/pre>\n<p>  \u2014 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c <code>data.config.conf.clusterCIDR: 10.55.0.0\/16<\/code>.<\/p>\n<p>  2. \u041c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 controller-manager&#8217;\u0430:<\/p>\n<pre><code class=\"bash\">vim \/etc\/kubernetes\/manifests\/kube-controller-manager.yaml<\/code><\/pre>\n<p>  \u2014 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c <code>--cluster-cidr=10.55.0.0\/16<\/code>.<\/p>\n<p>  3. \u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>.spec.podCIDR<\/code>, <code>.spec.podCIDRs<\/code>, <code>.InternalIP<\/code>, <code>.status.addresses<\/code> \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u043e\u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\">kubectl get no -o json | jq '[.items[] | {&quot;name&quot;: .metadata.name, &quot;podCIDR&quot;: .spec.podCIDR, &quot;podCIDRs&quot;: .spec.podCIDRs, &quot;InternalIP&quot;: (.status.addresses[] | select(.type == &quot;InternalIP&quot;) | .address)}]'<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"json\">[   {     &quot;name&quot;: &quot;kube-2-master&quot;,     &quot;podCIDR&quot;: &quot;10.244.0.0\/24&quot;,     &quot;podCIDRs&quot;: [       &quot;10.244.0.0\/24&quot;     ],     &quot;InternalIP&quot;: &quot;192.168.199.2&quot;   },   {     &quot;name&quot;: &quot;kube-2-master&quot;,     &quot;podCIDR&quot;: &quot;10.244.0.0\/24&quot;,     &quot;podCIDRs&quot;: [       &quot;10.244.0.0\/24&quot;     ],     &quot;InternalIP&quot;: &quot;10.0.1.239&quot;   },   {     &quot;name&quot;: &quot;kube-2-worker-01f438cf-579f9fd987-5l657&quot;,     &quot;podCIDR&quot;: &quot;10.244.1.0\/24&quot;,     &quot;podCIDRs&quot;: [       &quot;10.244.1.0\/24&quot;     ],     &quot;InternalIP&quot;: &quot;192.168.199.222&quot;   },   {     &quot;name&quot;: &quot;kube-2-worker-01f438cf-579f9fd987-5l657&quot;,     &quot;podCIDR&quot;: &quot;10.244.1.0\/24&quot;,     &quot;podCIDRs&quot;: [       &quot;10.244.1.0\/24&quot;     ],     &quot;InternalIP&quot;: &quot;10.0.4.73&quot;   } ]<\/code><\/pre>\n<p>  4. \u0417\u0430\u043c\u0435\u043d\u0438\u043c podCIDR, \u0432\u043d\u0435\u0441\u044f \u043f\u0440\u0430\u0432\u043a\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 etcd:<\/p>\n<pre><code class=\"bash\">.\/etcdhelper -cacert \/etc\/kubernetes\/pki\/etcd\/ca.crt -cert \/etc\/kubernetes\/pki\/etcd\/server.crt -key \/etc\/kubernetes\/pki\/etcd\/server.key -endpoint https:\/\/127.0.0.1:2379 change-pod-cidr 10.55.0.0\/16<\/code><\/pre>\n<p>  5. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e podCIDR \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f:<\/p>\n<pre><code class=\"bash\">kubectl get no -o json | jq '[.items[] | {&quot;name&quot;: .metadata.name, &quot;podCIDR&quot;: .spec.podCIDR, &quot;podCIDRs&quot;: .spec.podCIDRs, &quot;InternalIP&quot;: (.status.addresses[] | select(.type == &quot;InternalIP&quot;) | .address)}]'<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"json\">[   {     &quot;name&quot;: &quot;kube-2-master&quot;,     &quot;podCIDR&quot;: &quot;10.55.0.0\/24&quot;,     &quot;podCIDRs&quot;: [       &quot;10.55.0.0\/24&quot;     ],     &quot;InternalIP&quot;: &quot;192.168.199.2&quot;   },   {     &quot;name&quot;: &quot;kube-2-master&quot;,     &quot;podCIDR&quot;: &quot;10.55.0.0\/24&quot;,     &quot;podCIDRs&quot;: [       &quot;10.55.0.0\/24&quot;     ],     &quot;InternalIP&quot;: &quot;10.0.1.239&quot;   },   {     &quot;name&quot;: &quot;kube-2-worker-01f438cf-579f9fd987-5l657&quot;,     &quot;podCIDR&quot;: &quot;10.55.1.0\/24&quot;,     &quot;podCIDRs&quot;: [       &quot;10.55.1.0\/24&quot;     ],     &quot;InternalIP&quot;: &quot;192.168.199.222&quot;   },   {     &quot;name&quot;: &quot;kube-2-worker-01f438cf-579f9fd987-5l657&quot;,     &quot;podCIDR&quot;: &quot;10.55.1.0\/24&quot;,     &quot;podCIDRs&quot;: [       &quot;10.55.1.0\/24&quot;     ],     &quot;InternalIP&quot;: &quot;10.0.4.73&quot;   } ]<\/code><\/pre>\n<p>  6. \u041f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0432\u0441\u0435 \u0443\u0437\u043b\u044b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<p>  7. \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u0443 \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c <b>\u0441\u0442\u0430\u0440\u044b\u0439 podCIDR<\/b>, \u0442\u043e kube-controller-manager \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u0441\u044f, \u0430 pod&#8217;\u044b \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 podCIDR \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u0449\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/serverfault.com\/a\/977401\">\u0442\u0430\u043a<\/a>). \u041d\u043e \u0432\u0435\u0434\u044c \u043d\u0430\u043c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 etcd \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0430\u0432\u043a\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 Kubernetes \u0432 etcd \u2014 <i>\u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439<\/i> \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. (\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u0431\u0435\u0437 \u043f\u0440\u043e\u0441\u0442\u043e\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0443 Service \u043f\u043e\u043b\u0435 <code>spec.clusterIP<\/code>.)<\/p>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 etcd \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u0442.\u0435. \u0432 \u043e\u0431\u0445\u043e\u0434 Kubernetes API. \u0418\u043d\u043e\u0433\u0434\u0430 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u00ab\u0445\u0438\u0442\u0440\u044b\u0435 \u0448\u0442\u0443\u043a\u0438\u00bb. \u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 K8s-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u0445. \u041e\u0434\u043d\u0430\u043a\u043e \u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441 \u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438 \u043a \u0448\u0438\u0440\u043e\u043a\u043e\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044e \u2014 <b>PoC (proof of concept)<\/b>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b etcdhelper \u043d\u0430 \u0441\u0432\u043e\u0438\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u0445, \u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u044d\u0442\u043e \u043d\u0430 \u0441\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u0445 \u0438 \u0440\u0438\u0441\u043a.<\/p>\n<h2>P.S.<\/h2>\n<p>  \u0427\u0438\u0442\u0430\u0439\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0432 \u043d\u0430\u0448\u0435\u043c \u0431\u043b\u043e\u0433\u0435:<\/p>\n<ul>\n<li> \u00ab<a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/487534\/\">etcd 3.4.3: \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430<\/a>\u00bb;<\/li>\n<li> \u00ab<a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/485716\/\">Calico \u0434\u043b\u044f \u0441\u0435\u0442\u0438 \u0432 Kubernetes: \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437 \u043e\u043f\u044b\u0442\u0430<\/a>\u00bb;<\/li>\n<li> \u00ab<a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/443458\/\">6 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0431\u0430\u0433\u043e\u0432 \u043f\u0440\u0438 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 Kubernetes [\u0438 \u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0435]<\/a>\u00bb;<\/li>\n<li> \u00ab<a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/484954\/\">\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0435 \u043d\u0435\u0438\u0441\u043f\u0440\u0430\u0432\u043d\u043e\u0441\u0442\u0435\u0439 \u0432 Kubernetes<\/a>\u00bb.<\/li>\n<\/ul>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/501956\/\"> https:\/\/habr.com\/ru\/company\/flant\/blog\/501956\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/501956\/\">\u0412\u0441\u0435 \u0447\u0430\u0449\u0435 \u043a \u043d\u0430\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u0441 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0432 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0434\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430: \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0443, \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u2026<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ri\/mh\/du\/rimhduzpzbuwtylhnil4dorhzw4.png\"><\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u0441\u043e \u0441\u0432\u043e\u0435\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443 <code>memcached.staging.svc.cluster.local<\/code>. \u041c\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0430\u043a\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e VPN \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0430\u043d\u043e\u043d\u0441\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u0434\u0441\u0435\u0442\u0438 pod&#8217;\u043e\u0432, \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 push&#8217;\u0438\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0435 DNS \u043a\u043b\u0438\u0435\u043d\u0442\u0443. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443 <code>memcached.staging.svc.cluster.local<\/code>, \u0437\u0430\u043f\u0440\u043e\u0441 \u0443\u0445\u043e\u0434\u0438\u0442 \u0432 DNS \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438 \u0432 \u043e\u0442\u0432\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0430\u0434\u0440\u0435\u0441 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0438\u0437 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438\u043b\u0438 \u0430\u0434\u0440\u0435\u0441 pod&#8217;\u0430. <\/p>\n<p>  K8s-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e kubeadm, \u0433\u0434\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u0430\u044f \u043f\u043e\u0434\u0441\u0435\u0442\u044c \u2014 <code>192.168.0.0\/16<\/code>, \u0430 \u0441\u0435\u0442\u044c pod&#8217;\u043e\u0432 \u2014 <code>10.244.0.0\/16<\/code>. \u041e\u0431\u044b\u0447\u043d\u043e \u0432\u0441\u0451 \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432:<\/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-303979","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/303979","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=303979"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/303979\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=303979"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=303979"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=303979"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}