{"id":394379,"date":"2024-06-29T11:34:51","date_gmt":"2024-06-29T11:34:51","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=394379"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=394379","title":{"rendered":"<span>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c HAProxy Kubernetes Ingress Controller \u0432\u043d\u0435 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/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<blockquote>\n<p><em>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c HAProxy Kubernetes Ingress Controller \u0432\u043d\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0438 \u0447\u0438\u0441\u043b\u0430 \u0445\u043e\u043f\u043e\u0432<\/em><\/p>\n<\/blockquote>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/5b5\/e40\/691\/5b5e40691c8be7d7593319ad0dc38eff.jpg\" width=\"1465\" height=\"767\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5b5\/e40\/691\/5b5e40691c8be7d7593319ad0dc38eff.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435:<\/p>\n<ul>\n<li>\n<p><a href=\"#1\">\u0412 \u0447\u0435\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#2\">Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#3\">Ingress Controller \u0438 BIRD<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#4\">Calico \u0438 BGP-\u043e\u0431\u043c\u0435\u043d<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#5\">\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c Ingress<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#6\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#7\">\u041e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u043e\u0432<\/a><\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"1\" id=\"1\"><\/a><\/p>\n<h2>\u0412 \u0447\u0435\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/h2>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c HAProxy Kubernetes Ingress Controller \u043a\u0430\u043a \u043f\u043e\u0434 \u0432\u043d\u0443\u0442\u0440\u0438 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u041a\u0430\u043a \u043f\u043e\u0434, \u043e\u043d \u0438\u043c\u0435\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u043e\u0434\u0430\u043c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e \u0441\u0435\u0442\u044c Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0438 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u043c \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435. \u041d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 Ingress Controller.<\/p>\n<p>\u041a\u0430\u043a \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043e\u0434\u044b, Ingress Controller \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b Kubernetes, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442 \u043a \u043d\u0435\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f, \u043f\u043e\u043a\u0430 \u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u044f\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Service. \u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0435 \u0441\u0435\u0440\u0432\u0438\u0441 \u0442\u0438\u043f\u0430 <em>NodePort<\/em> \u0438\u043b\u0438 <em>LoadBalancer, <\/em>Kubernetes \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u043e\u0434\u0443 \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043c\u0438\u0440\u0430<em>.<\/em><\/p>\n<p>\u0412 \u043e\u0431\u043b\u0430\u043a\u0430\u0445 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442 LoadBalancer, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0443 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0435\u0433\u043e \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u0432 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, AWS Network Load Balancer) \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0434 Ingress Controller. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 self hosted Kubernetes \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 NodePort \u0438 \u0437\u0430\u0442\u0435\u043c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u0422\u0430\u043a \u0447\u0442\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0434 \u0432\u0430\u0448\u0438\u043c Ingress Controller, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0434\u0432\u043e\u0439\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u043e\u0439\u0442\u0438 \u0442\u0440\u0430\u0444\u0438\u043a \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0412 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 (Load Balancer) \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432, \u0430 \u0437\u0430\u0442\u0435\u043c Kubernetes \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0435\u0433\u043e \u043d\u0430 \u0443\u0437\u0435\u043b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043f\u043e\u0434 \u0441 Ingress Controller:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/016\/c72\/f80\/016c72f80486e3042191aa6a0d97cf7e.png\" width=\"1356\" height=\"652\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/016\/c72\/f80\/016c72f80486e3042191aa6a0d97cf7e.png\"\/><\/figure>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 1.5 HAProxy Ingress Controller, \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0441\u043d\u0430\u0440\u0443\u0436\u0438 \u0432\u0430\u0448\u0435\u0433\u043e Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u0447\u0442\u043e \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u043f\u0435\u0440\u0435\u0434 Ingress Controller. \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0442\u0438 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c Ingress Controller \u043d\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043a\u0430\u043a \u043f\u043e\u0434 \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u043c\u0443 \u043d\u0443\u0436\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0435\u0442\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c.<\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c <a href=\"https:\/\/www.projectcalico.org\/\">Calico<\/a> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0432 Kubernetes \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 BGP. \u0412 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d\u0435 BGP \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u0442\u0440\u0435\u0442\u044c\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u0435\u0442\u0438, \u043d\u043e \u0434\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u043e\u0443\u0442\u0435\u0440\u0430 <a href=\"https:\/\/bird.network.cz\/\"><u>\u0434\u0435\u043c\u043e\u043d\u0430 BIRD<\/u><\/a>, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0442\u043e\u0439 \u0436\u0435 VM, \u0447\u0442\u043e Ingress Controller.<\/p>\n<figure class=\"float bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/93b\/4af\/886\/93b4af8866b39056c8c1dc9fe8bb5b19.png\" width=\"799\" height=\"740\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/93b\/4af\/886\/93b4af8866b39056c8c1dc9fe8bb5b19.png\"\/><\/figure>\n<p>\u0414\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u043e\u044f\u0441\u043d\u044f\u0435\u0442 \u0441\u0445\u0435\u043c\u0443, \u0433\u0434\u0435 Ingress Controller \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043d\u0430\u0440\u0443\u0436\u0438 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 BIRD \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0441\u0435\u0442\u044c\u044e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<p>\u0414\u043b\u044f \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 <a href=\"https:\/\/github.com\/haproxytechblog\/ingress-controller-external-example\"><u>\u0434\u0435\u043c\u043e-\u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u0437 GitHub<\/u><\/a>. \u0412 \u043d\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f VirtualBox \u0438 Vagrant \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0441 4 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u0430\u0448\u0438\u043d\u0430\u043c\u0438. \u041e\u0434\u043d\u0430 VM \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 Ingress Controller \u0438 BIRD, \u0430 3 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440. \u0412\u044b\u0437\u043e\u0432\u0438\u0442\u0435 <code>vagrant up<\/code> \u0438\u0437 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d.<\/p>\n<p>\u041c\u044b \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c, \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 HAProxy Kubernetes Ingress Controller \u0438 \u043a\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0441 Calico.<\/p>\n<p><a class=\"anchor\" name=\"2\" id=\"2\"><\/a><\/p>\n<h3>Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440<\/h3>\n<p>\u0412 \u0434\u0435\u043c\u043e-\u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f <a href=\"https:\/\/www.vagrantup.com\/\"><u>Vagrant<\/u><\/a> \u0438 <a href=\"https:\/\/www.virtualbox.org\/\"><u>VirtualBox<\/u><\/a> \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d. 3 \u0438\u0437 \u043d\u0438\u0445 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440:<\/p>\n<ul>\n<li>\n<p>\u043e\u0434\u0438\u043d \u043c\u0430\u0441\u0442\u0435\u0440-\u0443\u0437\u0435\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0434\u0432\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0443\u0437\u043b\u0430 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043e\u0434\u043e\u0432 <\/p>\n<\/li>\n<\/ul>\n<p>Vagrant \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u0443\u0441\u043a Bash-\u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Kubernetes \u0438 Calico. \u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0434\u0430\u0435\u0442\u0435\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c, \u0437\u0430\u0447\u0435\u043c \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c Calico, \u043d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e Kubneretes \u2014 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0421\u0435\u0442\u0435\u0432\u044b\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/containernetworking\/cni\">CNI<\/a>. \u0421\u0440\u0435\u0434\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 Calico, Flannel, Cilium \u0438 Weave Net. BGP-\u043f\u0438\u0440\u0438\u043d\u0433 \u0432 Calico \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0442\u0435\u0440-\u0443\u0437\u0435\u043b, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 Bash-\u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 setup_kubernetes_control_plane.sh. \u041f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0442\u0430\u043a\u0438\u0435 \u044d\u0442\u0430\u043f\u044b:<\/p>\n<ol>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Docker<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0443\u0442\u0438\u043b\u0438\u0442 <code>kubeadm<\/code> \u0438 <code>kubectl<\/code><\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0437\u043e\u0432 <code>kubeadm init<\/code> \u0434\u043b\u044f \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u00a0<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b <em>kubeconfig<\/em> \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u044e\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043f\u043e SSH \u043a \u044d\u0442\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u044d\u0442\u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0433 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c <code>kubectl<\/code>-\u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Calico \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0441 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c BGP<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0443\u0442\u0438\u043b\u0438\u0442\u044b <code>calicoctl<\/code><\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 ConfigMap-\u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 Kubernetes <em>haproxy-kubernetes-ingress<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f Ingress Controller<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u0432\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0443\u0437\u043b\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Bash-\u0441\u043a\u0440\u0438\u043f\u0442\u0430 <em>setup_kubernetes_worker.sh.<\/em> \u041e\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:<\/p>\n<ol>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Docker<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 <code>kubeadm<\/code> \u0438 <code>kubectl<\/code><\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0437\u043e\u0432 <code>kubeadm<\/code> join \u0434\u043b\u044f \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043a \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u043e\u0440\u043a\u0435\u0440\u0430<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0442\u0430 \u0447\u0430\u0441\u0442\u044c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c Calico \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440. \u0421\u043a\u0440\u0438\u043f\u0442 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 Calico, \u0430 \u0437\u0430\u0442\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0435\u0442 Kubernetes-\u043e\u0431\u044a\u0435\u043a\u0442 <em>Installation<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 BGP \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0434\u043b\u044f \u0441\u0435\u0442\u0438:<\/p>\n<pre><code class=\"yaml\">apiVersion: operator.tigera.io\/v1 kind: Installation metadata:  name: default spec:  # Configures Calico networking.  calicoNetwork:    bgp: Enabled         # Note: The ipPools section cannot be modified post-install.    ipPools:    - blockSize: 26      cidr: 172.16.0.0\/16      encapsulation: IPIP      natOutgoing: Enabled      nodeSelector: all()<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 <code>calicoctl<\/code> \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0435\u0433\u043e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f <em>BGPConfiguration<\/em> \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <em>BGPPeer<\/em> \u0432 Kubernetes.<\/p>\n<pre><code class=\"yaml\">apiVersion: projectcalico.org\/v3 kind: BGPConfiguration metadata:  name: default spec:  logSeverityScreen: Info  nodeToNodeMeshEnabled: true  asNumber: 65000  --- apiVersion: projectcalico.org\/v3 kind: BGPPeer metadata:  name: my-global-peer spec:  peerIP: 192.168.50.21  asNumber: 65000<\/code><\/pre>\n<p>\u041e\u0431\u044a\u0435\u043a\u0442 <em>BGPConfiguration<\/em> \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f BGP-\u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0440\u0435\u0436\u0438\u043c full mesh network \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043d\u043e\u043c\u0435\u0440 Autonomous System (AS) \u0434\u043b\u044f Calico. \u041e\u0431\u044a\u0435\u043a\u0442 BGPPeer \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 IP-\u0430\u0434\u0440\u0435\u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b, \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f Ingress Controller, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d BIRD, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u043d\u043e\u043c\u0435\u0440 AS \u0434\u043b\u044f BIRD-\u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u042f \u0432\u044b\u0431\u0440\u0430\u043b \u043d\u043e\u043c\u0435\u0440 AS 65000. \u0422\u0430\u043a Calico \u0440\u0430\u0441\u0448\u0430\u0440\u0438\u0442 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b BIRD, \u0447\u0442\u043e\u0431\u044b \u0438\u0445 \u043c\u043e\u0433 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Ingress Controller.<\/p>\n<p><a class=\"anchor\" name=\"3\" id=\"3\"><\/a><\/p>\n<h2>Ingress Controller \u0438 BIRD<\/h2>\n<p>\u0412 \u0434\u0435\u043c\u043e-\u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c HAProxy Kubernetes Ingress Controller \u0438 BIRD \u043d\u0430 \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443. \u042d\u0442\u0430 VM \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u043d\u0435 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u0433\u0434\u0435 BIRD \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 IP-\u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u043e\u0442 Calico, \u0438 Ingress Controller \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0438\u0445 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u043f\u043e\u0434\u044b.<\/p>\n<p>Vagrant \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 Bash-\u0441\u043a\u0440\u0438\u043f\u0442 <code>setup_ingress_controller.sh<\/code> \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0448\u0430\u0433\u043e\u0432:<\/p>\n<ol>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 HAProxy, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0438\u0437\u0435\u0439\u0431\u043b\u0438\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>setcap<\/code> \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f HAProxy \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0440\u0442\u044b 80 \u0438 443<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 HAProxy Kubernetes Ingress Controller \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u0432 <em>\/usr\/local\/bin<\/em><\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 Systemd \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 Ingress Controller<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0432 \u043a\u043e\u0440\u0435\u043d\u044c \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0444\u0430\u0439\u043b <em>kubeconfig<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f Ingress-\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438 \u0441\u043c\u0435\u043d\u044b \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 BIRD<\/p>\n<\/li>\n<\/ol>\n<p>Ingress Controller \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u0436\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u043a\u0430\u043a \u0441\u0435\u0440\u0432\u0438\u0441 Systemd. \u041e\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>\/usr\/local\/bin\/haproxy-ingress-controller \\   --external \\   --configmap=default\/haproxy-kubernetes-ingress \\   --program=\/usr\/sbin\/haproxy \\   --disable-ipv6 \\   --ipv4-bind-address=0.0.0.0 \\   --http-bind-port=80<\/code><\/pre>\n<p>\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <code>--external<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 Ingress Controller \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u0441\u044f \u0432\u043d\u0435 Kubernetes. \u0422\u0430\u043a\u0436\u0435 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c HAProxy, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0444\u0430\u0439\u043b <em>kubeconfig<\/em> \u0432 <em>\/root\/.kube\/config.<\/em> \u041e\u0434\u043d\u0430\u043a\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0431\u0443\u0434\u0443\u0442 \u043f\u0430\u0434\u0430\u0442\u044c, \u043f\u043e\u043a\u0430 \u043c\u044b \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u0435\u0442\u044c 172.16.0.0\/16 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439.<\/p>\n<p>Calico \u043c\u043e\u0436\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 BIRD, \u0442\u0430\u043a \u0447\u0442\u043e \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0435\u0442\u0438. BIRD \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0433\u0434\u0435 \u043e\u043d \u0437\u0430\u043f\u0443\u0449\u0435\u043d, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u043e\u0434\u043e\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0434\u043b\u044f Ingress Controller. \u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c BIRD \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432 \u043e\u0442 Calico, \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u044e\u0442\u0441\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b Kubernetes.<\/p>\n<p><a class=\"anchor\" name=\"4\" id=\"4\"><\/a><\/p>\n<h2>Calico \u0438 BGP-\u043e\u0431\u043c\u0435\u043d<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u0434\u0430\u0442\u044c \u0432\u0430\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u043e\u0439. \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0432 \u0441\u0435\u0442\u0438 192.168.50.0\/24:<\/p>\n<ul>\n<li>\n<p>\u0443\u0437\u0435\u043b Ingress Controller = 192.168.50.21<\/p>\n<\/li>\n<li>\n<p>\u043c\u0430\u0441\u0442\u0435\u0440-\u0443\u0437\u0435\u043b = 192.168.50.22<\/p>\n<\/li>\n<li>\n<p>worker 1 = 192.168.50.23<\/p>\n<\/li>\n<li>\n<p>worker 2 = 192.168.50.24<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c\u0441\u044f \u043f\u043e SSH \u043a \u043c\u0430\u0441\u0442\u0435\u0440-\u0443\u0437\u043b\u0443 Kubernetes, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0443 vagrant ssh:<\/p>\n<pre><code>$ vagrant ssh controlplane<\/code><\/pre>\n<p>\u0412\u044b\u0437\u043e\u0432\u0435\u043c <code>kubectl get nodes<\/code>, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0443\u0437\u043b\u044b \u043f\u043e\u0434\u043d\u044f\u0442\u044b \u0438 \u0433\u043e\u0442\u043e\u0432\u044b:<\/p>\n<pre><code>$ kubectl get nodes  NAME           STATUS   ROLES                  AGE     VERSION controlplane   Ready    control-plane,master   4h7m    v1.21.1 worker1        Ready    &lt;none>                 4h2m    v1.21.1 worker2        Ready    &lt;none>                 3h58m   v1.21.1<\/code><\/pre>\n<p>\u0412\u044b\u0437\u043e\u0432\u0435\u043c <code>calicoctl node status<\/code> \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u043a\u0430\u043a\u0430\u044f \u0438\u0437 VM \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u043c \u0447\u0435\u0440\u0435\u0437 BGP:<\/p>\n<pre><code>$ sudo calicoctl node status  Calico process is running.  IPv4 BGP status +---------------+-------------------+-------+----------+--------------------------------+ | PEER ADDRESS  |     PEER TYPE     | STATE |  SINCE   |              INFO              | +---------------+-------------------+-------+----------+--------------------------------+ | 192.168.50.21 | global            | start | 00:10:03 | Active Socket: Connection      | |               |                   |       |          | refused                        | | 192.168.50.23 | node-to-node mesh | up    | 00:16:11 | Established                    | | 192.168.50.24 | node-to-node mesh | up    | 00:20:08 | Established                    | +---------------+-------------------+-------+----------+--------------------------------+ <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 192.168.50.23 \u0438 192.168.50.24 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u0443\u0437\u043b\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 BGP-\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c 192.168.50.21 \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b Ingress Controller \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 BIRD.<\/p>\n<p>Calico \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u043b\u0430 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u0437 \u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 IP \u0430\u0434\u0440\u0435\u0441\u0430 \u0438\u0437 \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0443\u043f\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 172.16.0.0\/16, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0432\u0435\u0440\u0445 \u0441\u0435\u0442\u0438 192.168.50.0\/24. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0437\u0432\u0430\u0442\u044c <code>kubectl describe blockaffinities<\/code>, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b.<\/p>\n<pre><code>$ kubectl describe blockaffinities | grep -E \"Name:|Cidr:\"  Name: controlplane-172-16-49-64-26  Cidr: 172.16.49.64\/26 Name: worker1-172-16-171-64-26  Cidr: 172.16.171.64\/26 Name: worker2-172-16-189-64-26  Cidr: 172.16.189.64\/26<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e worker 1 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d 172.16.171.64\/26, \u0430 worker 2 \u2014 172.16.171.64\/26. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 BIRD, \u0447\u0442\u043e\u0431\u044b:\u00a0<\/p>\n<ul>\n<li>\n<p>\u0437\u0430\u043f\u0440\u043e\u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0443\u0448\u0435\u043b \u0432 worker 1, \u0435\u0441\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 IP \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 172.16.171.64\/26<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u043f\u0440\u043e\u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0443\u0448\u0435\u043b \u0432 worker 2, \u0435\u0441\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 IP \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 172.16.189.64\/26 <\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u0430\u0441\u0442\u0435\u0440 Kubernetes \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u043e\u0434\u044b \u043d\u0430 \u043e\u0434\u0438\u043d \u0438\u0437 \u044d\u0442\u0438\u0445 \u0443\u0437\u043b\u043e\u0432.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e BIRD, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043f\u043e SSH \u043a \u0442\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f Ingress Controller.<\/p>\n<pre><code>$ vagrant ssh ingress<\/code><\/pre>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <em>\/etc\/bird\/bird.conf<\/em> \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 <code>protocol bgp<\/code> \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u043e\u0440\u043a\u0435\u0440\u0430. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0441\u0435\u043a\u0446\u0438\u044f <code>import filter<\/code> \u0433\u043e\u0432\u043e\u0440\u0438\u0442 BIRD, \u0447\u0442\u043e \u0435\u043c\u0443 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 IP-\u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u044d\u0442\u043e\u043c\u0443 \u0443\u0437\u043b\u0443, \u0430 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c:<\/p>\n<pre><code class=\"yaml\">router id 192.168.50.21;  log syslog all;  # \u043c\u0430\u0441\u0442\u0435\u0440-\u0443\u0437\u0435\u043b protocol bgp {    local 192.168.50.21 as 65000;    neighbor 192.168.50.22 as 65000;    direct;    import filter {      if ( net ~ [ 172.16.0.0\/16{26,26} ] ) then accept;    };    export none; }  # worker1 protocol bgp {    local 192.168.50.21 as 65000;    neighbor 192.168.50.23 as 65000;    direct;    import filter {      if ( net ~ [ 172.16.0.0\/16{26,26} ] ) then accept;    };    export none; }  # worker2 protocol bgp {    local 192.168.50.21 as 65000;    neighbor 192.168.50.24 as 65000;    direct;    import filter {      if ( net ~ [ 172.16.0.0\/16{26,26} ] ) then accept;    };    export none; }  protocol kernel {    scan time 60;    #import none;    export all;   # insert routes into the kernel routing table }  protocol device {    scan time 60; }<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 BIRD, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f:<\/p>\n<pre><code>$ sudo systemctl restart bird<\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0412\u044b\u0437\u043e\u0432\u0438\u0442\u0435 <code>birdc show protocols<\/code> \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b BIRD, \u0447\u0442\u043e BGP-\u043e\u0431\u043c\u0435\u043d \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d: <\/p>\n<pre><code>$ sudo birdc show protocols  BIRD 1.6.8 ready. name     proto    table    state  since       info bgp1     BGP      master   up     23:18:17    Established    bgp2     BGP      master   up     23:18:17    Established    bgp3     BGP      master   up     23:18:59    Established    kernel1  Kernel   master   up     23:18:15     device1  Device   master   up     23:18:15 <\/code><\/pre>\n<p>\u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0437\u0432\u0430\u0442\u044c <code>birdc show route protocol<\/code> \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0441\u0435\u0442\u0435\u0439 IP-\u0430\u0434\u0440\u0435\u0441\u0430\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u0438 \u0441\u0435\u0442\u0438 \u043f\u043e\u0434\u043e\u0432:<\/p>\n<pre><code>$ sudo birdc show route protocol bgp2  BIRD 1.6.8 ready. 172.16.171.64\/26   via 192.168.50.23 on enp0s8 [bgp2 23:18:18] * (100) [i]  $ sudo birdc show route protocol bgp3  BIRD 1.6.8 ready. 172.16.189.64\/26   via 192.168.50.24 on enp0s8 [bgp3 23:19:00] * (100) [i]<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0442\u0443\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u043d\u043e\u0432\u044b\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b.<\/p>\n<pre><code>$ route  Kernel IP routing table Destination     Gateway         Genmask         Flags Metric Ref    Use Iface default         _gateway        0.0.0.0         UG    100    0        0 enp0s3 10.0.2.0        0.0.0.0         255.255.255.0   U     0      0        0 enp0s3 _gateway        0.0.0.0         255.255.255.255 UH    100    0        0 enp0s3 172.16.49.64    192.168.50.22   255.255.255.192 UG    0      0        0 enp0s8 172.16.171.64   192.168.50.23   255.255.255.192 UG    0      0        0 enp0s8 172.16.189.64   192.168.50.24   255.255.255.192 UG    0      0        0 enp0s8 192.168.50.0    0.0.0.0         255.255.255.0   U     0      0        0 enp0s8<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u0435\u0440\u043d\u0435\u0442\u0435\u0441\u044c \u043a \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043c\u0430\u0441\u0442\u0435\u0440\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 <code>calicoctl node status<\/code>, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e Calico \u0443\u0436\u0435 \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 BGP-\u043e\u0431\u043c\u0435\u043d\u0430 \u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043e\u0439 Ingress Controller, 192.168.50.21:<\/p>\n<pre><code>$ sudo calicoctl node status  Calico process is running.  IPv4 BGP status +---------------+-------------------+-------+----------+-------------+ | PEER ADDRESS  |     PEER TYPE     | STATE |  SINCE   |    INFO     | +---------------+-------------------+-------+----------+-------------+ | 192.168.50.21 | global            | up    | 00:32:13 | Established | | 192.168.50.23 | node-to-node mesh | up    | 00:16:12 | Established | | 192.168.50.24 | node-to-node mesh | up    | 00:20:09 | Established | +---------------+-------------------+-------+----------+-------------+<\/code><\/pre>\n<p><a class=\"anchor\" name=\"5\" id=\"5\"><\/a><\/p>\n<h2>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c Ingress<\/h2>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043e\u0431\u043c\u0435\u043d\u0443 BGP-\u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c Ingress Controller \u043c\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0440\u0430\u0431\u043e\u0442\u0435. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043e\u0431\u044a\u0435\u043a\u0442 Ingress, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 YAML \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 5 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 Ingress-\u043e\u0431\u044a\u0435\u043a\u0442:<\/p>\n<pre><code class=\"yaml\">apiVersion: apps\/v1 kind: Deployment metadata:  labels:    run: app  name: app spec:  replicas: 5  selector:    matchLabels:      run: app  template:    metadata:      labels:        run: app    spec:      containers:      - name: app        image: jmalloc\/echo-server        ports:        - containerPort: 8080  ---        apiVersion: v1 kind: Service metadata:  labels:    run: app  name: app spec:  selector:    run: app  ports:  - name: port-1    port: 80    protocol: TCP    targetPort: 8080  --- apiVersion: networking.k8s.io\/v1 kind: Ingress metadata:  name: test-ingress  namespace: default spec:  rules:  - host: test.local    http:      paths:      - path: \/        pathType: Prefix        backend:          service:            name: app            port:              number: 80<\/code><\/pre>\n<p><em>Ingress<\/em>-\u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 Ingress Controller \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0442 test.local \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u043b\u0438. \u0412\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0444\u0430\u0439\u043b \/etc\/hosts \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0445\u043e\u0441\u0442\u0435 \u0434\u043b\u044f \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f test.local \u0441 IP-\u0430\u0434\u0440\u0435\u0441\u043e\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b Ingress Controller, 192.168.50.21.<\/p>\n<p>\u0420\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0447\u0435\u0440\u0435\u0437 <code>kubectl<\/code>:<\/p>\n<pre><code>$ kubectl apply -f app.yaml<\/code><\/pre>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 <em>test.local<\/em> \u0432 \u0432\u0430\u0448\u0435\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0438 \u0432\u0430\u0441 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u0435\u0442 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0432\u0430\u0448\u0435\u0433\u043e HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e! \u0412\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 HAProxy Kubernetes Ingress Controller \u0441\u043d\u0430\u0440\u0443\u0436\u0438 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430! \u0412\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u043e\u0439\u043d\u043e\u0435 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <em>harpoxy.cfg<\/em>, \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 <em>\/tmp\/haproxy-ingress\/etc\/haproxy.cfg<\/em>. \u041e\u043d \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b <code>backend<\/code> \u0441 \u0438\u043c\u0435\u043d\u0435\u043c default-app-port-1, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 <code>server<\/code> \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043f\u043e\u0434\u043e\u0432. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 <code>server<\/code> \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0438\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443, \u0438 Ingress Controller \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e. <\/p>\n<pre><code class=\"yaml\">backend default-app-port-1   mode http   balance roundrobin   option forwardfor   server SRV_1 172.16.171.67:8080 check weight 128   server SRV_2 172.16.171.68:8080 check weight 128   server SRV_3 172.16.189.68:8080 check weight 128   server SRV_4 172.16.189.69:8080 check weight 128   server SRV_5 172.16.189.70:8080 check weight 128<\/code><\/pre>\n<p><a class=\"anchor\" name=\"6\" id=\"6\"><\/a><\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438, \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c HAProxy Kubernetes Ingress Controller \u0441\u043d\u0430\u0440\u0443\u0436\u0438 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u042d\u0442\u043e \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e\u00a0 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u0432. \u0414\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0432\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Keepalive.<\/p>\n<p><a class=\"anchor\" name=\"7\" id=\"7\"><\/a><\/p>\n<hr\/>\n<p><strong>\u0414\u0440\u0443\u0433\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u043e DevOps \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445:<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/kts\/blog\/591355\/\">\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 Kubernetes \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438: Docker Swarm, Nomad, Openshift<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/kts\/blog\/708418\/\">\u041a\u0430\u043a \u0438\u0437\u0443\u0447\u0430\u0442\u044c Kubernetes \u0434\u0436\u0443\u043d\u0443 \u2014 \u0438 \u0437\u0430\u0447\u0435\u043c<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/kts\/blog\/593599\/\">\u041a\u0430\u043a \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 Django \u0432 Kubernetes \u0441 \u043d\u0443\u043b\u044f<\/a><\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0414\u0440\u0443\u0433\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u043e DevOps \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e\u0449\u0438\u0445:<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/kts\/blog\/719938\/\">\u041a\u0430\u043a \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u044d\u0440\u0433\u043e\u043d\u043e\u043c\u0438\u0447\u043d\u044b\u0439 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/kts\/blog\/682062\/\">\u0417\u0430\u0447\u0435\u043c \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0434\u043b\u044f \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432 \u0432 Kubernetes<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/kts\/blog\/587236\/\">\u041a\u0430\u043a \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0437\u0430\u0442\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c\u044b\u0435 Kubernetes<\/a><\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<p>\u0417\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0433\u043e\u0434\u044b \u0434\u0435-\u0444\u0430\u043a\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441\u0442\u0430\u043b Kubernetes. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443\u043c\u0435\u043d\u0438\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u0430\u0436\u043d\u044b\u043c \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e DevOps-\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430.\u00a0<\/p>\n<p>\u041f\u043e\u0440\u043e\u0433 \u0432\u0445\u043e\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u0438\u0437-\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438 \u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041d\u0430 \u043a\u0443\u0440\u0441\u0435\u00a0<a href=\"https:\/\/vk.cc\/cn0ty6\">\u00ab\u0414\u0435\u043f\u043b\u043e\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 Kubernetes\u00bb<\/a>\u00a0\u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0430\u043c\u044b\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c\u0438 \u043b\u044e\u0431\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u043d\u0430\u0443\u0447\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u044d\u0442\u0438 \u0437\u043d\u0430\u043d\u0438\u044f \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435.<\/p>\n<p>?\u00a0<strong>\u041f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0440\u043e \u043a\u0443\u0440\u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0434\u0435\u0441\u044c:<\/strong>\u00a0<a href=\"https:\/\/vk.cc\/cn0ty6\">https:\/\/vk.cc\/cn0ty6<\/a><\/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\/articles\/591853\/\"> https:\/\/habr.com\/ru\/articles\/591853\/<\/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<blockquote>\n<p><em>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c HAProxy Kubernetes Ingress Controller \u0432\u043d\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0438 \u0447\u0438\u0441\u043b\u0430 \u0445\u043e\u043f\u043e\u0432<\/em><\/p>\n<\/blockquote>\n<figure class=\"full-width\"><\/figure>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435:<\/p>\n<ul>\n<li>\n<p><a href=\"#1\">\u0412 \u0447\u0435\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#2\">Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#3\">Ingress Controller \u0438 BIRD<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#4\">Calico \u0438 BGP-\u043e\u0431\u043c\u0435\u043d<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#5\">\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c Ingress<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#6\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#7\">\u041e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u043e\u0432<\/a><\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"1\" id=\"1\"><\/a><\/p>\n<h2>\u0412 \u0447\u0435\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/h2>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c HAProxy Kubernetes Ingress Controller \u043a\u0430\u043a \u043f\u043e\u0434 \u0432\u043d\u0443\u0442\u0440\u0438 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u041a\u0430\u043a \u043f\u043e\u0434, \u043e\u043d \u0438\u043c\u0435\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u043e\u0434\u0430\u043c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e \u0441\u0435\u0442\u044c Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0438 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u043c \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435. \u041d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 Ingress Controller.<\/p>\n<p>\u041a\u0430\u043a \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043e\u0434\u044b, Ingress Controller \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b Kubernetes, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442 \u043a \u043d\u0435\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f, \u043f\u043e\u043a\u0430 \u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u044f\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Service. \u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0435 \u0441\u0435\u0440\u0432\u0438\u0441 \u0442\u0438\u043f\u0430 <em>NodePort<\/em> \u0438\u043b\u0438 <em>LoadBalancer, <\/em>Kubernetes \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u043e\u0434\u0443 \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043c\u0438\u0440\u0430<em>.<\/em><\/p>\n<p>\u0412 \u043e\u0431\u043b\u0430\u043a\u0430\u0445 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442 LoadBalancer, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0443 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0435\u0433\u043e \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u0432 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, AWS Network Load Balancer) \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0434 Ingress Controller. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 self hosted Kubernetes \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 NodePort \u0438 \u0437\u0430\u0442\u0435\u043c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u0422\u0430\u043a \u0447\u0442\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0434 \u0432\u0430\u0448\u0438\u043c Ingress Controller, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0434\u0432\u043e\u0439\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u043e\u0439\u0442\u0438 \u0442\u0440\u0430\u0444\u0438\u043a \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0412 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 (Load Balancer) \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432, \u0430 \u0437\u0430\u0442\u0435\u043c Kubernetes \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0435\u0433\u043e \u043d\u0430 \u0443\u0437\u0435\u043b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043f\u043e\u0434 \u0441 Ingress Controller:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 1.5 HAProxy Ingress Controller, \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0441\u043d\u0430\u0440\u0443\u0436\u0438 \u0432\u0430\u0448\u0435\u0433\u043e Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u0447\u0442\u043e \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u043f\u0435\u0440\u0435\u0434 Ingress Controller. \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0442\u0438 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c Ingress Controller \u043d\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043a\u0430\u043a \u043f\u043e\u0434 \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u043c\u0443 \u043d\u0443\u0436\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0435\u0442\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c.<\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c <a href=\"https:\/\/www.projectcalico.org\/\">Calico<\/a> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0432 Kubernetes \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 BGP. \u0412 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d\u0435 BGP \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u0442\u0440\u0435\u0442\u044c\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u0435\u0442\u0438, \u043d\u043e \u0434\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u043e\u0443\u0442\u0435\u0440\u0430 <a href=\"https:\/\/bird.network.cz\/\"><u>\u0434\u0435\u043c\u043e\u043d\u0430 BIRD<\/u><\/a>, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0442\u043e\u0439 \u0436\u0435 VM, \u0447\u0442\u043e Ingress Controller.<\/p>\n<figure class=\"float bordered full-width\"><\/figure>\n<p>\u0414\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u043e\u044f\u0441\u043d\u044f\u0435\u0442 \u0441\u0445\u0435\u043c\u0443, \u0433\u0434\u0435 Ingress Controller \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043d\u0430\u0440\u0443\u0436\u0438 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 BIRD \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0441\u0435\u0442\u044c\u044e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<p>\u0414\u043b\u044f \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 <a href=\"https:\/\/github.com\/haproxytechblog\/ingress-controller-external-example\"><u>\u0434\u0435\u043c\u043e-\u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u0437 GitHub<\/u><\/a>. \u0412 \u043d\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f VirtualBox \u0438 Vagrant \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0441 4 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u0430\u0448\u0438\u043d\u0430\u043c\u0438. \u041e\u0434\u043d\u0430 VM \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 Ingress Controller \u0438 BIRD, \u0430 3 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440. \u0412\u044b\u0437\u043e\u0432\u0438\u0442\u0435 <code>vagrant up<\/code> \u0438\u0437 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d.<\/p>\n<p>\u041c\u044b \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c, \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 HAProxy Kubernetes Ingress Controller \u0438 \u043a\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0441 Calico.<\/p>\n<p><a class=\"anchor\" name=\"2\" id=\"2\"><\/a><\/p>\n<h3>Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440<\/h3>\n<p>\u0412 \u0434\u0435\u043c\u043e-\u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f <a href=\"https:\/\/www.vagrantup.com\/\"><u>Vagrant<\/u><\/a> \u0438 <a href=\"https:\/\/www.virtualbox.org\/\"><u>VirtualBox<\/u><\/a> \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d. 3 \u0438\u0437 \u043d\u0438\u0445 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440:<\/p>\n<ul>\n<li>\n<p>\u043e\u0434\u0438\u043d \u043c\u0430\u0441\u0442\u0435\u0440-\u0443\u0437\u0435\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0434\u0432\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0443\u0437\u043b\u0430 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043e\u0434\u043e\u0432 <\/p>\n<\/li>\n<\/ul>\n<p>Vagrant \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u0443\u0441\u043a Bash-\u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Kubernetes \u0438 Calico. \u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0434\u0430\u0435\u0442\u0435\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c, \u0437\u0430\u0447\u0435\u043c \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c Calico, \u043d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e Kubneretes \u2014 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0421\u0435\u0442\u0435\u0432\u044b\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/containernetworking\/cni\">CNI<\/a>. \u0421\u0440\u0435\u0434\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 Calico, Flannel, Cilium \u0438 Weave Net. BGP-\u043f\u0438\u0440\u0438\u043d\u0433 \u0432 Calico \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0442\u0435\u0440-\u0443\u0437\u0435\u043b, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 Bash-\u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 setup_kubernetes_control_plane.sh. \u041f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0442\u0430\u043a\u0438\u0435 \u044d\u0442\u0430\u043f\u044b:<\/p>\n<ol>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Docker<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0443\u0442\u0438\u043b\u0438\u0442 <code>kubeadm<\/code> \u0438 <code>kubectl<\/code><\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0437\u043e\u0432 <code>kubeadm init<\/code> \u0434\u043b\u044f \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u00a0<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b <em>kubeconfig<\/em> \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u044e\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043f\u043e SSH \u043a \u044d\u0442\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u044d\u0442\u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0433 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c <code>kubectl<\/code>-\u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Calico \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0441 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c BGP<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0443\u0442\u0438\u043b\u0438\u0442\u044b <code>calicoctl<\/code><\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 ConfigMap-\u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 Kubernetes <em>haproxy-kubernetes-ingress<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f Ingress Controller<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u0432\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0443\u0437\u043b\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Bash-\u0441\u043a\u0440\u0438\u043f\u0442\u0430 <em>setup_kubernetes_worker.sh.<\/em> \u041e\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:<\/p>\n<ol>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Docker<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 <code>kubeadm<\/code> \u0438 <code>kubectl<\/code><\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0437\u043e\u0432 <code>kubeadm<\/code> join \u0434\u043b\u044f \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043a \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u043e\u0440\u043a\u0435\u0440\u0430<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0442\u0430 \u0447\u0430\u0441\u0442\u044c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c Calico \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440. \u0421\u043a\u0440\u0438\u043f\u0442 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 Calico, \u0430 \u0437\u0430\u0442\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0435\u0442 Kubernetes-\u043e\u0431\u044a\u0435\u043a\u0442 <em>Installation<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 BGP \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0434\u043b\u044f \u0441\u0435\u0442\u0438:<\/p>\n<pre><code class=\"yaml\">apiVersion: operator.tigera.io\/v1 kind: Installation metadata:  name: default spec:  # Configures Calico networking.  calicoNetwork:    bgp: Enabled         # Note: The ipPools section cannot be modified post-install.    ipPools:    - blockSize: 26      cidr: 172.16.0.0\/16      encapsulation: IPIP      natOutgoing: Enabled      nodeSelector: all()<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 <code>calicoctl<\/code> \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0435\u0433\u043e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f <em>BGPConfiguration<\/em> \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <em>BGPPeer<\/em> \u0432 Kubernetes.<\/p>\n<pre><code class=\"yaml\">apiVersion: projectcalico.org\/v3 kind: BGPConfiguration metadata:  name: default spec:  logSeverityScreen: Info  nodeToNodeMeshEnabled: true  asNumber: 65000  --- apiVersion: projectcalico.org\/v3 kind: BGPPeer metadata:  name: my-global-peer spec:  peerIP: 192.168.50.21  asNumber: 65000<\/code><\/pre>\n<p>\u041e\u0431\u044a\u0435\u043a\u0442 <em>BGPConfiguration<\/em> \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f BGP-\u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0440\u0435\u0436\u0438\u043c full mesh network \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043d\u043e\u043c\u0435\u0440 Autonomous System (AS) \u0434\u043b\u044f Calico. \u041e\u0431\u044a\u0435\u043a\u0442 BGPPeer \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 IP-\u0430\u0434\u0440\u0435\u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b, \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f Ingress Controller, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d BIRD, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u043d\u043e\u043c\u0435\u0440 AS \u0434\u043b\u044f BIRD-\u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u042f \u0432\u044b\u0431\u0440\u0430\u043b \u043d\u043e\u043c\u0435\u0440 AS 65000. \u0422\u0430\u043a Calico \u0440\u0430\u0441\u0448\u0430\u0440\u0438\u0442 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b BIRD, \u0447\u0442\u043e\u0431\u044b \u0438\u0445 \u043c\u043e\u0433 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Ingress Controller.<\/p>\n<p><a class=\"anchor\" name=\"3\" id=\"3\"><\/a><\/p>\n<h2>Ingress Controller \u0438 BIRD<\/h2>\n<p>\u0412 \u0434\u0435\u043c\u043e-\u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c HAProxy Kubernetes Ingress Controller \u0438 BIRD \u043d\u0430 \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443. \u042d\u0442\u0430 VM \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u043d\u0435 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u0433\u0434\u0435 BIRD \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 IP-\u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u043e\u0442 Calico, \u0438 Ingress Controller \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0438\u0445 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u043f\u043e\u0434\u044b.<\/p>\n<p>Vagrant \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 Bash-\u0441\u043a\u0440\u0438\u043f\u0442 <code>setup_ingress_controller.sh<\/code> \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0448\u0430\u0433\u043e\u0432:<\/p>\n<ol>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 HAProxy, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0438\u0437\u0435\u0439\u0431\u043b\u0438\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>setcap<\/code> \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f HAProxy \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0440\u0442\u044b 80 \u0438 443<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 HAProxy Kubernetes Ingress Controller \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u0432 <em>\/usr\/local\/bin<\/em><\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 Systemd \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 Ingress Controller<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0432 \u043a\u043e\u0440\u0435\u043d\u044c \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0444\u0430\u0439\u043b <em>kubeconfig<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f Ingress-\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438 \u0441\u043c\u0435\u043d\u044b \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 BIRD<\/p>\n<\/li>\n<\/ol>\n<p>Ingress Controller \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u0436\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u043a\u0430\u043a \u0441\u0435\u0440\u0432\u0438\u0441 Systemd. \u041e\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>\/usr\/local\/bin\/haproxy-ingress-controller \\   --external \\   --configmap=default\/haproxy-kubernetes-ingress \\   --program=\/usr\/sbin\/haproxy \\   --disable-ipv6 \\   --ipv4-bind-address=0.0.0.0 \\   --http-bind-port=80<\/code><\/pre>\n<p>\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <code>--external<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 Ingress Controller \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u0441\u044f \u0432\u043d\u0435 Kubernetes. \u0422\u0430\u043a\u0436\u0435 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c HAProxy, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0444\u0430\u0439\u043b <em>kubeconfig<\/em> \u0432 <em>\/root\/.kube\/config.<\/em> \u041e\u0434\u043d\u0430\u043a\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0431\u0443\u0434\u0443\u0442 \u043f\u0430\u0434\u0430\u0442\u044c, \u043f\u043e\u043a\u0430 \u043c\u044b \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u0435\u0442\u044c 172.16.0.0\/16 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439.<\/p>\n<p>Calico \u043c\u043e\u0436\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 BIRD, \u0442\u0430\u043a \u0447\u0442\u043e \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0435\u0442\u0438. BIRD \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0433\u0434\u0435 \u043e\u043d \u0437\u0430\u043f\u0443\u0449\u0435\u043d, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u043e\u0434\u043e\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0434\u043b\u044f Ingress Controller. \u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c BIRD \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432 \u043e\u0442 Calico, \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u044e\u0442\u0441\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b Kubernetes.<\/p>\n<p><a class=\"anchor\" name=\"4\" id=\"4\"><\/a><\/p>\n<h2>Calico \u0438 BGP-\u043e\u0431\u043c\u0435\u043d<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u0434\u0430\u0442\u044c \u0432\u0430\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u043e\u0439. \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0432 \u0441\u0435\u0442\u0438 192.168.50.0\/24:<\/p>\n<ul>\n<li>\n<p>\u0443\u0437\u0435\u043b Ingress Controller = 192.168.50.21<\/p>\n<\/li>\n<li>\n<p>\u043c\u0430\u0441\u0442\u0435\u0440-\u0443\u0437\u0435\u043b = 192.168.50.22<\/p>\n<\/li>\n<li>\n<p>worker 1 = 192.168.50.23<\/p>\n<\/li>\n<li>\n<p>worker 2 = 192.168.50.24<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c\u0441\u044f \u043f\u043e SSH \u043a \u043c\u0430\u0441\u0442\u0435\u0440-\u0443\u0437\u043b\u0443 Kubernetes, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0443 vagrant ssh:<\/p>\n<pre><code>$ vagrant ssh controlplane<\/code><\/pre>\n<p>\u0412\u044b\u0437\u043e\u0432\u0435\u043c <code>kubectl get nodes<\/code>, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0443\u0437\u043b\u044b \u043f\u043e\u0434\u043d\u044f\u0442\u044b \u0438 \u0433\u043e\u0442\u043e\u0432\u044b:<\/p>\n<pre><code>$ kubectl get nodes  NAME           STATUS   ROLES                  AGE     VERSION controlplane   Ready    control-plane,master   4h7m    v1.21.1 worker1        Ready    &lt;none>                 4h2m    v1.21.1 worker2        Ready    &lt;none>                 3h58m   v1.21.1<\/code><\/pre>\n<p>\u0412\u044b\u0437\u043e\u0432\u0435\u043c <code>calicoctl node status<\/code> \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u043a\u0430\u043a\u0430\u044f \u0438\u0437 VM \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u043c \u0447\u0435\u0440\u0435\u0437 BGP:<\/p>\n<pre><code>$ sudo calicoctl node status  Calico process is running.  IPv4 BGP status +---------------+-------------------+-------+----------+--------------------------------+ | PEER ADDRESS  |     PEER TYPE     | STATE |  SINCE   |              INFO              | +---------------+-------------------+-------+----------+--------------------------------+ | 192.168.50.21 | global            | start | 00:10:03 | Active Socket: Connection      | |               |                   |       |          | refused                        | | 192.168.50.23 | node-to-node mesh | up    | 00:16:11 | Established                    | | 192.168.50.24 | node-to-node mesh | up    | 00:20:08 | Established                    | +---------------+-------------------+-------+----------+--------------------------------+ <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 192.168.50.23 \u0438 192.168.50.24 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u0443\u0437\u043b\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 BGP-\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c 192.168.50.21 \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b Ingress Controller \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 BIRD.<\/p>\n<p>Calico \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u043b\u0430 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u0437 \u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 IP<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-394379","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/394379","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=394379"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/394379\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=394379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=394379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=394379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}