{"id":344607,"date":"2023-01-28T09:00:30","date_gmt":"2023-01-28T09:00:30","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=344607"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=344607","title":{"rendered":"<span>\u0420\u0430\u0441\u043a\u0430\u0442\u043a\u0430 k8s 1.26 ansible+jenkins<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0418 \u0432\u043e\u043e\u0431\u0449\u0435 managed cluster \u0441\u0432\u043e\u0438\u043c\u0438 \u0440\u0443\u043a\u0430\u043c\u0438 \u0437\u0430 1000 \u0438 \u043e\u0434\u0438\u043d \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e-\u0447\u0430\u0441.<\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e \u0432\u0441\u0435\u0445! \u041d\u0435\u0434\u0430\u0432\u043d\u0435\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 github (\u043a\u043e\u0433\u0434\u0430 \u0442\u0430\u043c \u0447\u0430\u0441\u0430\u043c\u0438 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043d\u0438\u0447\u0442\u043e) \u043f\u043e\u0431\u0443\u0434\u0438\u043b\u043e \u043c\u0435\u043d\u044f \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 k8s \u043d\u0430 bare metal.<\/p>\n<p>\u0418\u0442\u0430\u043a. \u0417\u0430\u0434\u0430\u0447\u0430: \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 kubernetes \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 1.26 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 CI\/CD \u0437\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f (\u043d\u0430 \u043c\u043e\u0435\u043c \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u043a\u043e\u043b\u043e 3 \u043c\u0438\u043d\u0443\u0442), \u0438 \u0432\u043e\u043e\u0431\u0449\u0435, \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0442 3 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c ubuntu, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0448\u043b\u0438 \u0442\u0435\u0441\u0442\u044b sonobuoy conformance (\u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044f \u043f\u043e\u0434 rhel \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043e\u043a).<\/p>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0440\u0435\u0434\u044b, \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0430\u043a\u0446\u0435\u043d\u0442 \u0441\u0434\u0435\u043b\u0430\u043d \u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438, \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d \u043b\u044e\u0431\u043e\u0439 \u0448\u0430\u0433, \u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0441\u0435 \u0438 \u0442\u0430\u043a \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u0443\u0434\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0414\u043b\u044f production \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 etcd \u0443\u0437\u043b\u044b, \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430 \u0440\u0430\u043c\u043a\u0430\u043c\u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438. \u041e\u0434\u043d\u0430\u043a\u043e, etcd \u0443\u0437\u043b\u044b \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440 \u043d\u043e\u0434\u0430\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0431\u0443\u0434\u0443\u0442 \u0432 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435.<\/p>\n<p>\u041e \u0440\u043e\u043b\u0438 ansible inventory.\u00a0<\/p>\n<pre><code class=\"yaml\">[masters] k8s [master] k8s [etcd] k8s [workers] r01 r02 [jenkins] k8s [grafana] k8s<\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c, \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u043c. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u044c, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 dhcp \u0441\u043b\u0443\u0436\u0431\u0443 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e API \u0441\u0432\u043e\u0435\u0433\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u0411\u0443\u0434\u0435\u0442 \u043d\u0435\u043b\u0438\u0448\u043d\u0438\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u043e\u043c\u0435\u043d \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430, \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043b\u044e\u0431\u043e\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043a \u0438\u043c\u0435\u043d\u0430\u043c \u0432\u0430\u0448\u0438\u0445 \u0443\u0437\u043b\u043e\u0432. \u0412\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c mac \u0430\u0434\u0440\u0435\u0441\u0430 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0441\u0432\u043e\u0438\u0445 \u0443\u0437\u043b\u043e\u0432 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f IP \u0430\u0434\u0440\u0435\u0441\u0430\u043c \u0432 \u0432\u0430\u0448\u0435\u0439 \u043f\u043e\u0434\u0441\u0435\u0442\u0438. \u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0441\u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043f\u043b\u0430\u043d \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u0443\u0437\u043b\u043e\u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.\u00a0<\/p>\n<hr\/>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1f7\/cfb\/ab1\/1f7cfbab191da19d5138f674fb55b4f8.png\" alt=\"\u0414\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u0447\u0442\u043e\u0431\u044b mac \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0431\u044b\u043b \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c.\" title=\"\u0414\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u0447\u0442\u043e\u0431\u044b mac \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0431\u044b\u043b \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c.\" width=\"2732\" height=\"2048\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1f7\/cfb\/ab1\/1f7cfbab191da19d5138f674fb55b4f8.png\"\/><figcaption>\u0414\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u0447\u0442\u043e\u0431\u044b mac \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0431\u044b\u043b \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c.<\/figcaption><\/figure>\n<p>\u041f\u043e\u0436\u0430\u043b\u0443\u0439, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043e\u0441\u043b\u0430\u0442\u044c public ssh \u043a\u043b\u044e\u0447\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0445\u043e\u0441\u0442\u0430 ansible \u043d\u0430 \u0443\u0437\u043b\u044b \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<p>\u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f: \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0438\u0437 \u043e\u0431\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430 \u0438 \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0445 \u0432 \u0432\u0438\u0434\u0435 \u0440\u043e\u043b\u0435\u0439 ansible. \u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 stage \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430 jenkins.\u00a0<\/p>\n<pre><code class=\"java\">pipeline {\u00a0 \u00a0 \u00a0 agent any \u00a0 \u00a0 options { \u00a0 \u00a0 \u00a0 \u00a0 parallelsAlwaysFailFast() \u00a0 \u00a0 } \u00a0 \u00a0 stages {\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 stage('Deploy Kubernetes Cluster conforms to kubeadm 1.26 kubernetes.io official'){\u00a0 \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 parallel { \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 stage('Apply system requirements'){ \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 steps {\u00a0 \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 sh 'ansible-playbook -i files\/hosts init-phd.yaml' \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 stage('Installing containerd container runtime'){ \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 steps{ \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 sh 'ansible-playbook -i files\/hosts init-phb.yaml' \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 stage('Configuring systemd cgroup driver'){ \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 steps{ \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 sh 'ansible-playbook -i files\/hosts init-phc.yaml' \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 stage('Installing kubeadm, kubelet and kubectl'){ \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 steps {\u00a0 \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 sh 'ansible-playbook -i files\/hosts init-pha.yaml' \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0\u00a0 \u00a0 \u00a0 \u00a0 stage('Bootstrap cluster with kubeadm'){ \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 steps {\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 sh 'ansible-playbook -i files\/hosts init-masters.yaml' \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0\u00a0 \u00a0 \u00a0 \u00a0 } \u00a0 \u00a0 } }<\/code><\/pre>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u0443 \u043d\u0430\u0441 5 PLAYs: 4 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 PLAY <\/p>\n<hr\/>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cd5\/01f\/c52\/cd501fc526906fd6253d81c392c48f08.png\" alt=\"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e kubeadm \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043c\u0430\u0441\u0442\u0435\u0440 \u0443\u0437\u043b\u0430\" title=\"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e kubeadm \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043c\u0430\u0441\u0442\u0435\u0440 \u0443\u0437\u043b\u0430\" width=\"2732\" height=\"2048\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cd5\/01f\/c52\/cd501fc526906fd6253d81c392c48f08.png\"\/><figcaption>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e kubeadm \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043c\u0430\u0441\u0442\u0435\u0440 \u0443\u0437\u043b\u0430<\/figcaption><\/figure>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0432 ansible.cfg \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u00a0<\/p>\n<pre><code class=\"yaml\">[defaults] forks = 50<\/code><\/pre>\n<p>\u041e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0437\u043b\u043e\u0432 \u0432 inventory, \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u0430\u0445.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0434\u0430\u043b\u0435\u0435, \u043c\u0430\u0441\u0442\u0435\u0440 \u0443\u0437\u043b\u044b \u0438 \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u0443\u0437\u043b\u044b \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430\u0445. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c\u0438 ansible. \u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044e \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0443\u0437\u043b\u043e\u0432. \u041d\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0440\u0430\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u044b\u0435 \u0442\u0430\u0440\u0431\u043e\u043b\u044b \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043e\u0431\u044a\u0435\u043c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0441 \u043c\u0430\u0441\u0442\u0435\u0440 \u0443\u0437\u043b\u0430. \u0422\u0430\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f etcd, \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e \u0432\u0440\u0435\u043c\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0432\u043e\u0435\u0439 \u0411\u0414.<\/p>\n<p>PLAYs:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u043d\u0443\u0436\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 swap<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 containerd, \u0441\u0440\u0435\u0434\u044b \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f runc, \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 cgroup \u0432 linux systemd<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 kubernetes<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a kubeadm \u0434\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0430\u0441\u0442\u0435\u0440 \u0443\u0437\u043b\u0430<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0422\u0435\u043f\u0435\u0440\u044c \u043a \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430\u043c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 kubernetes. \u0412 \u0432\u0435\u0440\u0441\u0438\u0438 1.26:<\/strong><\/p>\n<ul>\n<li>\n<p>\u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0432\u0432\u0435\u0434\u0435\u043d \u043d\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f ubuntu, \u0432\u0441\u0432\u044f\u0437\u0438 \u0441 deprecated apt-key<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0440\u043e\u043b\u0435\u0439 \u0438 \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430. \u041a\u043e\u0433\u0434\u0430 \u0435\u0433\u043e, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435\u0442. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448\u0443 \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0448\u0430\u0433\u0430 3 \u0432 defaults:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"yaml\"># defaults file for containerd content:     github.com\/containerd\/containerd\/releases\/download\/v1.6.4\/ :        name: containerd-1.6.4-linux-amd64.tar.gz       path: \/usr\/local       tag:  tar     github.com\/containernetworking\/plugins\/releases\/download\/v1.1.1\/ :        name: cni-plugins-linux-amd64-v1.1.1.tgz       path: \/opt\/cni\/bin       tag:  tar     github.com\/opencontainers\/runc\/releases\/download\/v1.1.4\/ :        name: runc.amd64       path: \/usr\/local\/sbin\/runc       tag:  install     raw.githubusercontent.com\/containerd\/containerd\/main\/ :        name: containerd.service       path: \/usr\/local\/lib\/systemd\/system       tag:  service     containerd-file-config.toml:       name: .\/roles\/containerd\/files\/config.toml       path: \/etc\/containerd       tag: file     cni-template-j2file:       name: .\/roles\/containerd\/templates\/10-containerd-net.conflist.j2       path: \/etc\/cni\/net.d\/10-containerd-net.conflist       tag: j2t     cni-lo-file:       name: .\/roles\/containerd\/files\/99-loopback.conf       path: \/etc\/cni\/net.d       tag: file<\/code><\/pre>\n<ul>\n<li>\n<p>\u0421\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0442\u0430\u0440\u0431\u043e\u043b\u044b \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u0438\u043c\u0435\u044e\u0442 \u0442\u044d\u0433 \u2018tar\u2019<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c runc \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u043d\u043e\u0441\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 install<\/p>\n<\/li>\n<li>\n<p>\u0424\u0430\u0439\u043b \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430 containerd \u0441 \u0442\u044d\u0433\u043e\u043c \u2018service\u2019<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0432 \u0432\u0438\u0434\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 jinja \u0442\u044d\u0433 \u2018j2t\u2019<\/p>\n<\/li>\n<li>\n<p>\u0423\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f containerd \u043f\u043e\u0434 systemd \u0438 loopback \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0441 \u0442\u044d\u0433\u043e\u043c file<\/p>\n<\/li>\n<\/ul>\n<p>\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u043e\u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u0442 \u0438\u0437 \u0440\u0443\u0442\u0438\u043d\u043d\u044b\u0445 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0439 \u0430\u0440\u0445\u0438\u0432\u043e\u0432, \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043e\u043a, \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u0432\u044b\u0437\u043e\u0432\u043e\u0432 install, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432, \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430 systemd \u0438 service restart+enable, \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0438 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0440\u043e\u043b\u0438. \u041c\u043e\u0438 \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0445\u043e\u0442\u044f \u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435. \u041f\u0440\u043e\u0441\u0442\u043e \u0432\u0441\u0435 \u044d\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0439 \u043c\u043d\u043e\u0439 \u0440\u043e\u043b\u044c\u044e ansible \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u0435\u0433\u043e\u0432. \u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 defaults \u0434\u043b\u044f ansible \u0432\u043d\u0443\u0442\u0440\u0438 PLAY \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043e\u0431\u0449\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e. \u0420\u043e\u043b\u044c:<\/p>\n<pre><code class=\"yaml\"># tasks file for wgi  - name: Wget content   get_url:     url: \"https:\/\/{{ item.key }}{{ item.value.name }}\"     dest: \"\/tmp\/{{ item.value.name }}\"     force: false   loop: \"{{ content | dict2items |             rejectattr('value.tag', 'search', 'file' ) |             rejectattr('value.tag', 'search', 'j2t' ) |             list }}\"   loop_control:      label: \"{{ item.key }}\"   - block:    - name: Creates directory     file:       path: \"{{                item.value.path                   if not (item.value.tag in ['install','j2t'])                      else ( item.value.path | dirname )               }}\"       state: directory       owner: root       group: root       mode: 0755     loop: \"{{ content | dict2items  }}\"     loop_control:       label: \"{{ item.key }}\"    - name: Copy services content     copy:       src:  \"\/tmp\/{{ item.value.name }}\"       dest: \"{{ item.value.path }}\"       remote_src: yes     register: content_restart     notify:       - reload systemd       - restart systemd     loop: \"{{ content | dict2items | selectattr('value.tag', 'search', 'service' ) | list }}\"     loop_control:       label: \"{{ item.key }}\"            - name: Extract archived     unarchive:       src:  \"\/tmp\/{{ item.value.name }}\"       dest: \"{{ item.value.path }}\"       owner: root       group: root       mode:  0755       remote_src: yes     loop: \"{{ content | dict2items | selectattr('value.tag', 'search', 'tar' ) | list }}\"     loop_control:       label: \"{{ item.key }}\"    - name: Install module     shell: install -m 755 \"\/tmp\/{{ item.value.name }}\" \"{{ item.value.path }}\"     args:       creates: \"{{ item.value.path }}\"     loop: \"{{ content | dict2items | selectattr('value.tag', 'search', 'install' ) | list }}\"     loop_control:       label: \"{{ item.key }}\"          - name: Copy plain artifacts     copy:       src:  \"\/tmp\/{{ item.value.name }}\"       dest: \"{{ item.value.path }}\"       owner: root       group: root       mode: u=rw,g=r,o=r       remote_src: yes     loop: \"{{ content | dict2items | selectattr('value.tag', 'search', 'plain' ) | list }}\"     loop_control:       label: \"{{ item.key }}\"    - name: Copy role files     copy:       src:  \"{{ item.value.name }}\"       dest: \"{{ item.value.path }}\"       owner: root       group: root       mode: u=rw,g=r,o=r     loop: \"{{ content | dict2items | selectattr('value.tag', 'search', 'file' ) | list }}\"     loop_control:       label: \"{{ item.key }}\"          - name: Copy role templates     template:       src:  \"{{ item.value.name }}\"       dest: \"{{ item.value.path }}\"       owner: root       group: root       mode: u=rw,g=r,o=r     loop: \"{{ content | dict2items | selectattr('value.tag', 'search', 'j2t' ) | list }}\"     loop_control:       label: \"{{ item.key }}\"    become: yes <\/code><\/pre>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u044f\u0441\u043d\u0438\u0442\u044c, \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 systemd \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 notify. \u0417\u0430\u043f\u0438\u0441\u0438 \u0434\u043b\u044f changed \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u0432 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0435, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e handler restart systemd \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 enabled. Handlers \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0444\u0430\u0439\u043b\u0435 \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u043e\u043b\u0438, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, ansible \u0442\u0430\u043a \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>\u0428\u0430\u0431\u043b\u043e\u043d jinja2 \u0432 templates \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0430\u0434\u0440\u0435\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d \u0441\u0435\u0442\u0435\u0432\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 cni.<\/p>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c, tasks\/main.yml \u0434\u043b\u044f \u0440\u043e\u043b\u0438 containerd \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0432\u0441\u0435\u043c \u0431\u0435\u0437 \u043a\u043e\u0434\u0430. \u041a\u043e\u0434\u0430 \u043d\u0435\u0442, \u0430 \u0447\u0443\u0432\u0441\u0442\u0432\u043e \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u0438\u044f \u0435\u0441\u0442\u044c.<\/p>\n<p>\u0427\u0442\u043e \u0432\u0430\u0436\u043d\u043e\u0433\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 config.toml \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439:<\/p>\n<pre><code class=\"yaml\">[plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.runc]  \u00a0 ...  \u00a0 [plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.runc.options]  \u00a0 \u00a0 SystemdCgroup = true<\/code><\/pre>\n<p>\u0418<\/p>\n<pre><code class=\"yaml\">[plugins.\"io.containerd.grpc.v1.cri\"]  \u00a0 sandbox_image = \"registry.k8s.io\/pause:3.2\"<\/code><\/pre>\n<p>\u0424\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 containerd \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<\/p>\n<p>\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c 4 \u043f\u0443\u043d\u043a\u0442.<\/p>\n<p>\u041e\u043f\u044f\u0442\u044c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u0430\u044f \u0440\u043e\u043b\u044c. \u0421\u043a\u0430\u0447\u0430\u0435\u0442 \u043a\u043b\u044e\u0447 \u0434\u043b\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f.<\/p>\n<pre><code class=\"yaml\">content: \u00a0 packages.cloud.google.com\/apt\/doc\/: \u00a0 \u00a0 name: apt-key.gpg \u00a0 \u00a0 path:\u00a0 \/etc\/apt\/keyrings\/ \u00a0 \u00a0 tag: plain \u00a0 Add-the-Kubernetes-apt-repository: \u00a0 \u00a0 name: .\/roles\/k8s-install\/files\/kubernetes.list \u00a0 \u00a0 path: \/etc\/apt\/sources.list.d \u00a0 \u00a0 tag: file<\/code><\/pre>\n<p>\u0424\u0430\u0439\u043b kubernetes.list \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u043b\u044f \u0440\u043e\u043b\u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:\u00a0<\/p>\n<pre><code class=\"xml\">deb [signed-by=\/etc\/apt\/keyrings\/apt-key.gpg] https:\/\/apt.kubernetes.io\/ kubernetes-xenial main<\/code><\/pre>\n<p>\u041a\u043e\u0434\u0430 \u043e\u043f\u044f\u0442\u044c \u043d\u0435\u0442, \u0440\u043e\u043b\u044c \u0438\u0437 \u0448\u0430\u0433\u0430 4 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u043e\u043b\u044c\u043a\u043e defaults.<\/p>\n<p>\u0422\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u043e\u0442 \u044d\u0442\u043e:<\/p>\n<pre><code class=\"yaml\">net.bridge.bridge-nf-call-iptables\u00a0 = 1 net.bridge.bridge-nf-call-ip6tables = 1 net.ipv4.ip_forward \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 = 1<\/code><\/pre>\n<p>\u041e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0432 \u0448\u0430\u0433\u0435 5:<\/p>\n<pre><code class=\"yaml\">- hosts: master \u00a0 become: yes \u00a0 pre_tasks: \u00a0 \u00a0 - name: initialize the cluster \u00a0 \u00a0 \u00a0 shell: kubeadm init --pod-network-cidr=10.244.0.0\/16 \u00a0 \u00a0 \u00a0 args: \u00a0 \u00a0 \u00a0 \u00a0 chdir: $HOME \u00a0 \u00a0 \u00a0 \u00a0 creates: \/etc\/kubernetes\/admin.conf \u00a0 \u00a0 \u00a0 register: kubeadm  \u00a0 \u00a0 - debug:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 var: kubeadm.stdout_lines \u00a0 roles: \u00a0 \u00a0 - k8s-copy-admin<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 creates \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043c\u0430\u0441\u0442\u0435\u0440 \u0443\u0437\u043b\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0432 \u0433\u0440\u0443\u043f\u043f\u0443 masters, \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e kubeadm \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c2c\/da9\/b9e\/c2cda9b9e3820fb79801458e76273ff2.png\" alt=\"\u0420\u0430\u0431\u043e\u0447\u0438\u0435 \u0443\u0437\u043b\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430\" title=\"\u0420\u0430\u0431\u043e\u0447\u0438\u0435 \u0443\u0437\u043b\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430\" width=\"2732\" height=\"2048\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c2c\/da9\/b9e\/c2cda9b9e3820fb79801458e76273ff2.png\"\/><figcaption>\u0420\u0430\u0431\u043e\u0447\u0438\u0435 \u0443\u0437\u043b\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430<\/figcaption><\/figure>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0443\u0437\u043b\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0441 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043c\u0430\u0441\u0442\u0435\u0440 \u0443\u0437\u043b\u0430. \u0420\u0430\u0431\u043e\u0447\u0438\u0445 \u0443\u0437\u043b\u043e\u0432 \u043e\u0431\u044b\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043c\u0430\u0441\u0442\u0435\u0440 \u0443\u0437\u043b\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u043c \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0443\u0437\u043b\u0435. \u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 kubeadm \u043d\u0443\u0436\u043d\u0430, \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440 \u0443\u0437\u043b\u0435.<\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u043e\u0442\u043d\u0438 \u0441\u0430\u043c\u044b\u0445 \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u044b\u0445 \u0433\u0438\u043f\u043e\u0442\u0435\u0437 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432 \u043e\u0431\u043b\u0430\u043a\u0430\u0445, \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435.<\/p>\n<p>\u0411\u043e\u043b\u044c\u0448\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u043f\u043e \u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435 \u0432 \u043c\u043e\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 https:\/\/itoracl.github.io\/k8s<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/713398\/\"> https:\/\/habr.com\/ru\/post\/713398\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0418 \u0432\u043e\u043e\u0431\u0449\u0435 managed cluster \u0441\u0432\u043e\u0438\u043c\u0438 \u0440\u0443\u043a\u0430\u043c\u0438 \u0437\u0430 1000 \u0438 \u043e\u0434\u0438\u043d \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e-\u0447\u0430\u0441.<\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e \u0432\u0441\u0435\u0445! \u041d\u0435\u0434\u0430\u0432\u043d\u0435\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 github (\u043a\u043e\u0433\u0434\u0430 \u0442\u0430\u043c \u0447\u0430\u0441\u0430\u043c\u0438 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043d\u0438\u0447\u0442\u043e) \u043f\u043e\u0431\u0443\u0434\u0438\u043b\u043e \u043c\u0435\u043d\u044f \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 k8s \u043d\u0430 bare metal.<\/p>\n<p>\u0418\u0442\u0430\u043a. \u0417\u0430\u0434\u0430\u0447\u0430: \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 kubernetes \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 1.26 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 CI\/CD \u0437\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f (\u043d\u0430 \u043c\u043e\u0435\u043c \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u043a\u043e\u043b\u043e 3 \u043c\u0438\u043d\u0443\u0442), \u0438 \u0432\u043e\u043e\u0431\u0449\u0435, \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0442 3 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c ubuntu, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0448\u043b\u0438 \u0442\u0435\u0441\u0442\u044b sonobuoy conformance (\u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044f \u043f\u043e\u0434 rhel \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043e\u043a).<\/p>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0440\u0435\u0434\u044b, \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0430\u043a\u0446\u0435\u043d\u0442 \u0441\u0434\u0435\u043b\u0430\u043d \u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438, \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d \u043b\u044e\u0431\u043e\u0439 \u0448\u0430\u0433, \u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0441\u0435 \u0438 \u0442\u0430\u043a \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u0443\u0434\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0414\u043b\u044f production \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 etcd \u0443\u0437\u043b\u044b, \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430 \u0440\u0430\u043c\u043a\u0430\u043c\u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438. \u041e\u0434\u043d\u0430\u043a\u043e, etcd \u0443\u0437\u043b\u044b \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440 \u043d\u043e\u0434\u0430\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0431\u0443\u0434\u0443\u0442 \u0432 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435.<\/p>\n<p>\u041e \u0440\u043e\u043b\u0438 ansible inventory.\u00a0<\/p>\n<pre><code class=\"yaml\">[masters] k8s [master] k8s [etcd] k8s [workers] r01 r02 [jenkins] k8s [grafana] k8s<\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c, \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u043c. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u044c, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 dhcp \u0441\u043b\u0443\u0436\u0431\u0443 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e API \u0441\u0432\u043e\u0435\u0433\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u0411\u0443\u0434\u0435\u0442 \u043d\u0435\u043b\u0438\u0448\u043d\u0438\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u043e\u043c\u0435\u043d \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430, \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043b\u044e\u0431\u043e\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043a \u0438\u043c\u0435\u043d\u0430\u043c \u0432\u0430\u0448\u0438\u0445 \u0443\u0437\u043b\u043e\u0432. \u0412\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c mac \u0430\u0434\u0440\u0435\u0441\u0430 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0441\u0432\u043e\u0438\u0445 \u0443\u0437\u043b\u043e\u0432 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f IP \u0430\u0434\u0440\u0435\u0441\u0430\u043c \u0432 \u0432\u0430\u0448\u0435\u0439 \u043f\u043e\u0434\u0441\u0435\u0442\u0438. \u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0441\u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043f\u043b\u0430\u043d \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u0443\u0437\u043b\u043e\u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.\u00a0<\/p>\n<hr\/>\n<figure class=\"full-width\"><figcaption>\u0414\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u0447\u0442\u043e\u0431\u044b mac \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0431\u044b\u043b \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c.<\/figcaption><\/figure>\n<p>\u041f\u043e\u0436\u0430\u043b\u0443\u0439, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043e\u0441\u043b\u0430\u0442\u044c public ssh \u043a\u043b\u044e\u0447\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0445\u043e\u0441\u0442\u0430 ansible \u043d\u0430 \u0443\u0437\u043b\u044b \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<p>\u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f: \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0438\u0437 \u043e\u0431\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430 \u0438 \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0445 \u0432 \u0432\u0438\u0434\u0435 \u0440\u043e\u043b\u0435\u0439 ansible. \u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 stage \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430 jenkins.\u00a0<\/p>\n<pre><code class=\"java\">pipeline {\u00a0 \u00a0 \u00a0 agent any \u00a0 \u00a0 options { \u00a0 \u00a0 \u00a0 \u00a0 parallelsAlwaysFailFast() \u00a0 \u00a0 } \u00a0 \u00a0 stages {\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 stage('Deploy Kubernetes Cluster conforms to kubeadm 1.26 kubernetes.io official'){\u00a0 \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 parallel { \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 stage('Apply system requirements'){ \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 steps {\u00a0 \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 sh 'ansible-playbook -i files\/hosts init-phd.yaml' \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 stage('Installing containerd container runtime'){ \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 steps{ \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 sh 'ansible-playbook -i files\/hosts init-phb.yaml' \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 stage('Configuring systemd cgroup driver'){ \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 steps{ \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 sh 'ansible-playbook -i files\/hosts init-phc.yaml' \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 stage('Installing kubeadm, kubelet and kubectl'){ \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 steps {\u00a0 \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 sh 'ansible-playbook -i files\/hosts init-pha.yaml' \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0\u00a0 \u00a0 \u00a0 \u00a0 stage('Bootstrap cluster with kubeadm'){ \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 steps {\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 sh 'ansible-playbook -i files\/hosts init-masters.yaml' \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0\u00a0 \u00a0 \u00a0 \u00a0 } \u00a0 \u00a0 } }<\/code><\/pre>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u0443 \u043d\u0430\u0441 5 PLAYs: 4 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 PLAY <\/p>\n<hr\/>\n<figure class=\"full-width\"><figcaption>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e kubeadm \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043c\u0430\u0441\u0442\u0435\u0440 \u0443\u0437\u043b\u0430<\/figcaption><\/figure>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0432 ansible.cfg \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u00a0<\/p>\n<pre><code class=\"yaml\">[defaults] forks = 50<\/code><\/pre>\n<p>\u041e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0437\u043b\u043e\u0432 \u0432 inventory, \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u0430\u0445.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0434\u0430\u043b\u0435\u0435, \u043c\u0430\u0441\u0442\u0435\u0440 \u0443\u0437\u043b\u044b \u0438 \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u0443\u0437\u043b\u044b \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430\u0445. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c\u0438 ansible. \u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044e \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0443\u0437\u043b\u043e\u0432. \u041d\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0440\u0430\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u044b\u0435 \u0442\u0430\u0440\u0431\u043e\u043b\u044b \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043e\u0431\u044a\u0435\u043c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0441 \u043c\u0430\u0441\u0442\u0435\u0440 \u0443\u0437\u043b\u0430. \u0422\u0430\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f etcd, \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e \u0432\u0440\u0435\u043c\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0432\u043e\u0435\u0439 \u0411\u0414.<\/p>\n<p>PLAYs:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u043d\u0443\u0436\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 swap<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 containerd, \u0441\u0440\u0435\u0434\u044b \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f runc, \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 cgroup \u0432 linux systemd<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 kubernetes<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a kubeadm \u0434\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0430\u0441\u0442\u0435\u0440 \u0443\u0437\u043b\u0430<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0422\u0435\u043f\u0435\u0440\u044c \u043a \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430\u043c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 kubernetes. \u0412 \u0432\u0435\u0440\u0441\u0438\u0438 1.26:<\/strong><\/p>\n<ul>\n<li>\n<p>\u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0432\u0432\u0435\u0434\u0435\u043d \u043d\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f ubuntu, \u0432\u0441\u0432\u044f\u0437\u0438 \u0441 deprecated apt-key<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0440\u043e\u043b\u0435\u0439 \u0438 \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430. \u041a\u043e\u0433\u0434\u0430 \u0435\u0433\u043e, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435\u0442. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448\u0443 \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0448\u0430\u0433\u0430 3 \u0432 defaults:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"yaml\"># defaults file for containerd content:     github.com\/containerd\/containerd\/releases\/download\/v1.6.4\/ :        name: containerd-1.6.4-linux-amd64.tar.gz       path: \/usr\/local       tag:  tar     github.com\/containernetworking\/plugins\/releases\/download\/v1.1.1\/ :        name: cni-plugins-linux-amd64-v1.1.1.tgz       path: \/opt\/cni\/bin       tag:  tar     github.com\/opencontainers\/runc\/releases\/download\/v1.1.4\/ :        name: runc.amd64       path: \/usr\/local\/sbin\/runc       tag:  install     raw.githubusercontent.com\/containerd\/containerd\/main\/ :        name: containerd.service       path: \/usr\/local\/lib\/systemd\/system       tag:  service     containerd-file-config.toml:       name: .\/roles\/containerd\/files\/config.toml       path: \/etc\/containerd       tag: file     cni-template-j2file:       name: .\/roles\/containerd\/templates\/10-containerd-net.conflist.j2       path: \/etc\/cni\/net.d\/10-containerd-net.conflist       tag: j2t     cni-lo-file:       name: .\/roles\/containerd\/files\/99-loopback.conf       path: \/etc\/cni\/net.d       tag: file<\/code><\/pre>\n<ul>\n<li>\n<p>\u0421\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0442\u0430\u0440\u0431\u043e\u043b\u044b \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u0438\u043c\u0435\u044e\u0442 \u0442\u044d\u0433 \u2018tar\u2019<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c runc \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u043d\u043e\u0441\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 install<\/p>\n<\/li>\n<li>\n<p>\u0424\u0430\u0439\u043b \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430 containerd \u0441 \u0442\u044d\u0433\u043e\u043c \u2018service\u2019<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0432 \u0432\u0438\u0434\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 jinja \u0442\u044d\u0433 \u2018j2t\u2019<\/p>\n<\/li>\n<li>\n<p>\u0423\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f containerd \u043f\u043e\u0434 systemd \u0438 loopback \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0441 \u0442\u044d\u0433\u043e\u043c file<\/p>\n<\/li>\n<\/ul>\n<p>\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u043e\u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u0442 \u0438\u0437 \u0440\u0443\u0442\u0438\u043d\u043d\u044b\u0445 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0439 \u0430\u0440\u0445\u0438\u0432\u043e\u0432, \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043e\u043a, \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u0432\u044b\u0437\u043e\u0432\u043e\u0432 install, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432, \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430 systemd \u0438 service restart+enable, \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0438 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0440\u043e\u043b\u0438. \u041c\u043e\u0438 \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0445\u043e\u0442\u044f \u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435. \u041f\u0440\u043e\u0441\u0442\u043e \u0432\u0441\u0435 \u044d\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0439 \u043c\u043d\u043e\u0439 \u0440\u043e\u043b\u044c\u044e ansible \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u0435\u0433\u043e\u0432. \u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 defaults \u0434\u043b\u044f ansible \u0432\u043d\u0443\u0442\u0440\u0438 PLAY \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043e\u0431\u0449\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e. \u0420\u043e\u043b\u044c:<\/p>\n<pre><code class=\"yaml\"># tasks file for wgi  - name: Wget content   get_url:     url: \"https:\/\/{{ item.key }}{{ item.value.name }}\"     dest: \"\/tmp\/{{ item.value.name }}\"     force: false   loop: \"{{ content | dict2items |             rejectattr('value.tag', 'search', 'file' ) |             rejectattr('value.tag', 'search', 'j2t' ) |             list }}\"   loop_control:      label: \"{{ item.key }}\"   - block:    - name: Creates directory     file:       path: \"{{                item.value.path                   if not (item.value.tag in ['install','j2t'])                      else ( item.value.path | dirname )               }}\"       state: directory       owner: root       group: root       mode: 0755     loop: \"{{ content | dict2items  }}\"     loop_control:       label: \"{{ item.key }}\"    - name: Copy services content     copy:       src:  \"\/tmp\/{{ item.value.name }}\"       dest: \"{{ item.value.path }}\"       remote_src: yes     register: content_restart     notify:       - reload systemd       - restart systemd     loop: \"{{ content | dict2items | selectattr('value.tag', 'search', 'service' ) | list }}\"     loop_control:       label: \"{{ item.key }}\"            - name: Extract archived     unarchive:       src:  \"\/tmp\/{{ item.value.name }}\"       dest: \"{{ item.value.path }}\"       owner: root       group: root       mode:  0755       remote_src: yes     loop: \"{{ content | dict2items | selectattr('value.tag', 'search', 'tar' ) | list }}\"     loop_control:       label: \"{{ item.key }}\"    - name: Install module     shell: install -m 755 \"\/tmp\/{{ item.value.name }}\" \"{{ item.value.path }}\"     args:       creates: \"{{ item.value.path }}\"     loop: \"{{ content | dict2items | selectattr('value.tag', 'search', 'install' ) | list }}\"     loop_control:       label: \"{{ item.key }}\"          - name: Copy plain artifacts     copy:       src:  \"\/tmp\/{{ item.value.name }}\"       dest: \"{{ item.value.path }}\"       owner: root       group: root       mode: u=rw,g=r,o=r       remote_src: yes     loop: \"{{ content | dict2items | selectattr('value.tag', 'search', 'plain' ) | list }}\"     loop_control:       label: \"{{ item.key }}\"    - name: Copy role files     copy:       src:  \"{{ item.value.name }}\"       dest: \"{{ item.value.path }}\"       owner: root       group: root       mode: u=rw,g=r,o=r     loop: \"{{ content | dict2items | selectattr('value.tag', 'search', 'file' ) | list }}\"     loop_control:       label: \"{{ item.key }}\"          - name: Copy role templates     template:       src:  \"{{ item.value.name }}\"       dest: \"{{ item.value.path }}\"       owner: root       group: root       mode: u=rw,g=r,o=r     loop: \"{{ content | dict2items | selectattr('value.tag', 'search', 'j2t' ) | list }}\"     loop_control:       label: \"{{ item.key }}\"    become: yes <\/code><\/pre>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u044f\u0441\u043d\u0438\u0442\u044c, \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 systemd \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 notify. \u0417\u0430\u043f\u0438\u0441\u0438 \u0434\u043b\u044f changed \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u0432 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0435, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e handler restart systemd \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 enabled. Handlers \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0444\u0430\u0439\u043b\u0435 \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u043e\u043b\u0438, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, ansible \u0442\u0430\u043a \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>\u0428\u0430\u0431\u043b\u043e\u043d jinja2 \u0432 templates \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0430\u0434\u0440\u0435\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d \u0441\u0435\u0442\u0435\u0432\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 cni.<\/p>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c, tasks\/main.yml \u0434\u043b\u044f \u0440\u043e\u043b\u0438 containerd \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0432\u0441\u0435\u043c \u0431\u0435\u0437 \u043a\u043e\u0434\u0430. \u041a\u043e\u0434\u0430 \u043d\u0435\u0442, \u0430 \u0447\u0443\u0432\u0441\u0442\u0432\u043e \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u0438\u044f \u0435\u0441\u0442\u044c.<\/p>\n<p>\u0427\u0442\u043e \u0432\u0430\u0436\u043d\u043e\u0433\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 config.toml \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439:<\/p>\n<pre><code class=\"yaml\">[plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.runc]  \u00a0 ...  \u00a0<\/code><\/pre>\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-344607","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/344607","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=344607"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/344607\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=344607"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=344607"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=344607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}