{"id":362330,"date":"2024-05-21T01:32:55","date_gmt":"2024-05-21T01:32:55","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=362330"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T01:32:55","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=362330","title":{"rendered":"<span>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0432 Kubernetes: ServiceAccount \u0438 RBAC<\/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>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043a\u0440\u0430\u0442\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f k8s, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0443\u0447\u0435\u0442\u043d\u044b\u043c\u0438 \u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u044b \u0438 \u0441\u0435\u043a\u0440\u0435\u0442\u044b \u0432 \u0438\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043b\u0430\u0433\u0438\u043d \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c RBAC;<\/p>\n<\/li>\n<li>\n<p>\u0440\u043e\u043b\u0438 \u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u0440\u043e\u043b\u0435\u0439.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f65\/df5\/2a3\/f65df52a391a5139ab11c35310dbc595.png\" alt=\"\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\" title=\"\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\" width=\"4353\" height=\"1845\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f65\/df5\/2a3\/f65df52a391a5139ab11c35310dbc595.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/figcaption><\/div>\n<\/figure>\n<p>Kubernetes \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0435\u0442 \u0434\u0432\u0430 \u0432\u0438\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 API:<\/p>\n<ul>\n<li>\n<p>\u0420\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043b\u044e\u0434\u0438 (\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438) &#8212; \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, SSO. \u0414\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b CRUD (create, read, update, delete) \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c API \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d.<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0434\u0443\u043b\u0438 (\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f) &#8212; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u043b\u0443\u0436\u0431, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u043a\u0430\u043a \u0440\u0435\u0441\u0443\u0440\u0441\u044b ServiceAccount.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 API \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u041a\u043e\u0433\u0434\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 API \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441, \u043e\u043d \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044f. \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0437\u0432\u043b\u0435\u043a \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u044f\u0434\u0440\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 API \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0433\u0440\u0443\u043f\u043f\u044b, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u043a\u043b\u0438\u0435\u043d\u0442. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 API.<\/p>\n<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ul>\n<li>\n<p>\u0438\u0437 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0438\u0437 \u0442\u043e\u043a\u0435\u043d\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e HTTP;<\/p>\n<\/li>\n<li>\n<p>\u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 HTTP-\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0413\u0440\u0443\u043f\u043f\u044b<\/h2>\n<p>\u0412 Kubernetes \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c\u0435\u044e\u0442 \u043e\u0441\u043e\u0431\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>system:unauthenticated &#8212; \u043d\u0435\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442;<\/p>\n<\/li>\n<li>\n<p>system:authenticated &#8212; \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442;<\/p>\n<\/li>\n<li>\n<p>system:serviceaccounts &#8212; \u0432\u0441\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>system:serviceaccounts:- \u0432\u0441\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d.<\/p>\n<\/li>\n<\/ul>\n<h2>ServiceAccount<\/h2>\n<p>ServiceAccount &#8212; \u043e\u0431\u044a\u0435\u043a\u0442, \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0441\u043b\u0443\u0436\u0431\u044b \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f (pod-\u0430).<br \/> \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c, \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u044f\u0441\u044c, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442  \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 <em>\/var\/run\/secrets\/kubernetes.io\/serviceaccount\/token<\/em> (\u0444\u0430\u0439\u043b \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043c secret). \u042d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u043e\u043a\u0435\u043d \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 ServiceAccount.<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u044d\u0442\u043e\u0442 \u0442\u043e\u043a\u0435\u043d \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 API, \u043f\u043b\u0430\u0433\u0438\u043d \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 ServiceAccount \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u044f\u0434\u0440\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 API. \u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f ServiceAccount \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: <em>system:serviceaccount::&lt;\u0438\u043c\u044f \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u043b\u0443\u0436\u0431\u044b><\/em>.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 API \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442, \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0423\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c (\u0423\u0417) \u0441\u043b\u0443\u0436\u0431\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<br \/>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c ServiceAccount \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u041a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c (pod) \u0441\u0432\u044f\u0437\u0430\u043d \u0440\u043e\u0432\u043d\u043e \u0441 \u043e\u0434\u043d\u043e\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u0441\u043b\u0443\u0436\u0431\u044b, \u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c. \u041c\u043e\u0434\u0443\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c ServiceAccount \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d (namespace).<\/p>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0423\u0417 ServiceAccount \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044f\u043c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u044f \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435: <em>spec.serviceAccountName<\/em>.<\/p>\n<h2>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f ServiceAccount<\/h2>\n<p>\u041d\u0430\u0437\u043d\u0430\u0447\u0430\u044f \u043c\u043e\u0434\u0443\u043b\u044f\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0423\u0417 \u0441\u043b\u0443\u0436\u0431, \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e, \u043a \u043a\u0430\u043a\u0438\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u0438\u043c\u0435\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c. \u041a\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u0440\u043e\u0441, \u043d\u0435\u0441\u0443\u0449\u0438\u0439 \u0432 \u0441\u0435\u0431\u0435 \u0442\u043e\u043a\u0435\u043d \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 API, \u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u044d\u0442\u043e\u0442 \u0442\u043e\u043a\u0435\u043d \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d \u043b\u0438 \u0435\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u0421\u0435\u0440\u0432\u0435\u0440 API \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0442 \u043e\u0431\u0449\u0435\u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f RBAC (role-based access control).<\/p>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u0432\u043e\u044f \u0423\u0417 ServiceAccount, \u043d\u043e \u0434\u043b\u044f \u0440\u0430\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438. \u0422\u043e\u043a\u0435\u043d\u044b \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u044f\u0445 \u0441\u043b\u0443\u0436\u0431 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u043c\u0430\u0440\u043a\u0435\u0440\u044b JWT.<\/p>\n<h2>\u041c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u044b \u0423\u0417 \u0441\u043b\u0443\u0436\u0431\u044b<\/h2>\n<p>\u0422\u043e\u043a\u0435\u043d \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432 (mountable secrets). \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043c\u043e\u0434\u0443\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0441\u0435\u043a\u0440\u0435\u0442.<\/p>\n<p>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0423\u0417 \u0441\u043b\u0443\u0436\u0431\u044b \u0442\u0438\u043f\u0430:<br \/><em>kubernetes.io\/enforce-mountable-secrets=\u201ctrue<\/em>\u201d \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432 \u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u044e \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u043a\u0430\u043a \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0432 \u0423\u0417 \u0441\u043b\u0443\u0436\u0431\u044b (mountable secrets).<\/p>\n<h2>\u0421\u0435\u043a\u0440\u0435\u0442\u044b \u0423\u0417 \u0434\u043b\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432<\/h2>\n<p>\u0423\u0417 ServiceAccount \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432 \u0441 \u0443\u0447\u0435\u0442\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0438\u0437 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 (image pull secrets). \u042d\u0442\u0438 \u0441\u0435\u043a\u0440\u0435\u0442\u044b \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442, \u043a\u0430\u043a\u0438\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u044b \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u043c. \u041e\u043d\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442, \u043a\u0430\u043a\u0438\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u043e \u0432\u0441\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<p><u>\u041b\u0438\u0441\u0442\u0438\u043d\u0433 ServiceAccount<\/u><\/p>\n<pre><code class=\"yaml\">apiVersion: v1 kind: ServiceAccount metadata:   annotations:     kubernetes.io\/enforce-mountable-secrets: \"true\"   name: my-serviceaccount   namespace: my-namespace imagePullSecrets: - name: regcred # \u044d\u0442\u0438 \u0441\u0435\u043a\u0440\u0435\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043e \u0432\u0441\u0435 \u043c\u043e\u0434\u0443\u043b\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0435 \u044d\u0442\u0443 \u0423\u0417<\/code><\/pre>\n<h2>\u041f\u043b\u0430\u0433\u0438\u043d RBAC<\/h2>\n<p>\u041f\u043b\u0430\u0433\u0438\u043d RBAC &#8212; \u044d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 Kubernetes. \u041e\u043d \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0438\u043b\u0438 \u043a \u043d\u0435\u0440\u0435\u0441\u0443\u0440\u0441\u043d\u044b\u043c \u043f\u0443\u0442\u044f\u043c (\/api, \/health, etc).<\/p>\n<p>\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 RBAC \u0432\u044b\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>Role (\u0434\u043b\u044f namespace), ClusterRole (\u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430) \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0438 \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0435.<\/p>\n<\/li>\n<li>\n<p>RoleBinding, ClusterRoleBinding &#8212; \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u0440\u043e\u043b\u0438 \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0433\u0440\u0443\u043f\u043f\u0430\u043c, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u043c \u0423\u0417.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0440\u043e\u043b\u0438 \u0443\u0440\u043e\u0432\u043d\u044f namespace &#8212; RoleBinding \u043c\u043e\u0436\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u0443\u044e \u0440\u043e\u043b\u044c ClusterRole, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d. \u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u043e\u0439 \u0440\u043e\u043b\u0438 ClusterRoleBinding \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0440\u043e\u043b\u044c \u0443\u0440\u043e\u0432\u043d\u044f \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d Role.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4ff\/685\/a8a\/4ff685a8a0239aa246db24b7c97feedd.png\" alt=\"\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f: \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0440\u043e\u043b\u0438 \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0440\u043e\u043b\u044c (\u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d); \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u043e\u0439 \u0440\u043e\u043b\u0438 \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u0443\u044e \u0440\u043e\u043b\u044c (\u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0443\u0440\u043e\u0432\u043d\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438 \u043d\u0435\u0440\u0435\u0441\u0443\u0440\u0441\u043d\u044b\u0445 URL-\u043f\u0443\u0442\u0435\u0439)\" title=\"\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f: \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0440\u043e\u043b\u0438 \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0440\u043e\u043b\u044c (\u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d); \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u043e\u0439 \u0440\u043e\u043b\u0438 \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u0443\u044e \u0440\u043e\u043b\u044c (\u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0443\u0440\u043e\u0432\u043d\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438 \u043d\u0435\u0440\u0435\u0441\u0443\u0440\u0441\u043d\u044b\u0445 URL-\u043f\u0443\u0442\u0435\u0439)\" width=\"1713\" height=\"264\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4ff\/685\/a8a\/4ff685a8a0239aa246db24b7c97feedd.png\"\/><\/p>\n<div><figcaption>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f: \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0440\u043e\u043b\u0438 \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0440\u043e\u043b\u044c (\u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d); \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u043e\u0439 \u0440\u043e\u043b\u0438 \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u0443\u044e \u0440\u043e\u043b\u044c (\u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0443\u0440\u043e\u0432\u043d\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438 \u043d\u0435\u0440\u0435\u0441\u0443\u0440\u0441\u043d\u044b\u0445 URL-\u043f\u0443\u0442\u0435\u0439)<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/990\/a8d\/797\/990a8d797e231c58f8fa20d87a34a443.png\" alt=\"\u041d\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0440\u043e\u043b\u0438 \u043c\u043e\u0436\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u0443\u044e \u0440\u043e\u043b\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u043e\u043b\u044c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d, \u043a\u043e \u0432\u0441\u0435\u043c\u0443 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443; \u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u043e\u0439 \u0440\u043e\u043b\u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0440\u043e\u043b\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d, \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u043e\u043b\u044c \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d\" title=\"\u041d\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0440\u043e\u043b\u0438 \u043c\u043e\u0436\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u0443\u044e \u0440\u043e\u043b\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u043e\u043b\u044c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d, \u043a\u043e \u0432\u0441\u0435\u043c\u0443 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443; \u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u043e\u0439 \u0440\u043e\u043b\u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0440\u043e\u043b\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d, \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u043e\u043b\u044c \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d\" width=\"1713\" height=\"294\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/990\/a8d\/797\/990a8d797e231c58f8fa20d87a34a443.png\"\/><\/p>\n<div><figcaption>\u041d\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0440\u043e\u043b\u0438 \u043c\u043e\u0436\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u0443\u044e \u0440\u043e\u043b\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u043e\u043b\u044c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d, \u043a\u043e \u0432\u0441\u0435\u043c\u0443 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443; \u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u043e\u0439 \u0440\u043e\u043b\u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0440\u043e\u043b\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d, \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u043e\u043b\u044c \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d<\/figcaption><\/div>\n<\/figure>\n<p>\u0421 RBAC \u043c\u043e\u0433\u0443\u0442 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c, \u0438, \u0435\u0441\u043b\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f.<\/p>\n<h2>Role<\/h2>\n<p>Role RBAC (\u0438 ClusterRole) \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u043d\u0430\u0431\u043e\u0440 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439. \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0430\u0434\u0434\u0438\u0442\u0438\u0432\u043d\u044b\u043c\u0438 (\u043f\u0440\u0430\u0432\u0438\u043b \u00abdeny\u00bb \u043d\u0435\u0442). \u0415\u0441\u043b\u0438 \u0434\u043b\u044f \u0440\u043e\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d namespace, \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0438\u0439.<\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u0440\u043e\u043b\u044c, \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e apiGroup, \u0438 \u043d\u0435\u043b\u044c\u0437\u044f \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u0440\u043e\u043b\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 apiGroup, \u0440\u043e\u043b\u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 apiGroup.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430\u043c \u0441\u043b\u0443\u0436\u0431, \u0443\u043a\u0430\u0437\u0430\u0432 \u0438\u0445 \u0438\u043c\u0435\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 resourceNames.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u043e\u043b\u0438 \u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0439 \u0423\u0417 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d.<\/p>\n<p><u>\u041b\u0438\u0441\u0442\u0438\u043d\u0433 Role<\/u><\/p>\n<pre><code class=\"yaml\">apiVersion: rbac.authorization.k8s.io\/v1 kind: Role metadata:   namespace: default   name: pod-reader rules: - apiGroups: [\"\"] # \u043f\u0443\u0441\u0442\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438 \"\" \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u043d\u0435\u0432\u0430\u044f API group   resources: [\"pods\"]   verbs: [\"get\", \"watch\", \"list\"]<\/code><\/pre>\n<h2>RoleBinding<\/h2>\n<p>\u200b\u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0440\u043e\u043b\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u0440\u043e\u043b\u0438, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0438\u043b\u0438 \u0433\u0440\u0443\u043f\u043f\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041e\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0433\u0440\u0443\u043f\u043f \u0438\u043b\u0438 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0441\u043b\u0443\u0436\u0431) \u0438 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u0443\u044e \u0440\u043e\u043b\u044c. <\/p>\n<p>\u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0440\u043e\u043b\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0434\u043d\u0443 \u0440\u043e\u043b\u044c, \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0434\u0430\u0436\u0435 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 \u0438\u043c\u0435\u043d (namespace). RoleBinding \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u0443\u0440\u043e\u0432\u043d\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<p><u>\u041b\u0438\u0441\u0442\u0438\u043d\u0433 RoleBinding<\/u><\/p>\n<pre><code class=\"yaml\">apiVersion: rbac.authorization.k8s.io\/v1 # \u042d\u0442\u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0440\u043e\u043b\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u00ab\u0414\u0436\u0435\u0439\u043d\u00bb \u0447\u0438\u0442\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d \u00ab\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e\u00bb. # \u0423 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0440\u043e\u043b\u044c \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u00abpod-reader\u00bb \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d. kind: RoleBinding metadata:   name: read-pods   namespace: default subjects: # \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u00ab\u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0430\u00bb - kind: User   name: jane # \u043f\u043e\u043b\u0435 \"name\" \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443   apiGroup: rbac.authorization.k8s.io roleRef:   # \"roleRef\" \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443 \u043a Role\/ClusterRole   kind: Role # \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c Role \u0438\u043b\u0438 ClusterRole   name: pod-reader # \u044d\u0442\u043e \u0438\u043c\u044f \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0440\u043e\u043b\u0438 \u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u043e\u0439 \u0440\u043e\u043b\u0438, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443 \u0440\u043e\u043b\u0438   apiGroup: rbac.authorization.k8s.io<\/code><\/pre>\n<h2>ClusterRole<\/h2>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 \u0438\u043c\u0435\u043d, \u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 URL-\u043f\u0443\u0442\u0438 \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438. \u0414\u043b\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043d\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0435 \u0440\u043e\u043b\u0438. \u041e\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0443, \u0438\u043c\u0435\u044e\u0449\u0435\u043c\u0443 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d, \u0432\u043e \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430\u0445 \u0438\u043c\u0435\u043d. <\/p>\n<p>\u041a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0435 \u0440\u043e\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u044b \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u043e\u0439 RoleBinding, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u044d\u0442\u0438\u0445 \u0440\u043e\u043b\u0435\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d.<\/p>\n<p><strong>\u041a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0435 \u0440\u043e\u043b\u0438 k8s:<\/strong><\/p>\n<ul>\n<li>\n<p>View &#8212; \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043a\u0440\u043e\u043c\u0435 \u0440\u043e\u043b\u0435\u0439, \u043f\u0440\u0438\u0432\u044f\u0437\u043e\u043a \u0440\u043e\u043b\u0435\u0439 \u0438 \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432 (\u0441 \u0446\u0435\u043b\u044c\u044e \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0441\u043a\u0430\u043b\u0430\u0446\u0438\u044e \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439)<\/p>\n<\/li>\n<li>\n<p>Edit &#8212; \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u044b; \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432, \u043d\u043e \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u044b \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0440\u043e\u043b\u0435\u0439, \u043f\u0440\u0438\u0432\u044f\u0437\u043e\u043a \u0440\u043e\u043b\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p>Admin &#8212; \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043d\u0430\u0434 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e\u043c \u0438\u043c\u0435\u043d. \u0417\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441 ResourceQuota \u0438 \u0440\u0435\u0441\u0443\u0440\u0441 Namespace. \u0421\u0435\u0440\u0432\u0435\u0440 API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0440\u043e\u043b\u0438, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0438\u043c\u0435\u044e\u0442 \u0432\u0441\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u044d\u0442\u043e\u0439 \u0440\u043e\u043b\u0438 (\u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439).<\/p>\n<\/li>\n<li>\n<p>Cluster-Admin &#8212; \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0435, \u0447\u0442\u043e \u0438 Admin, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441 ResourceQuota \u0438 \u0440\u0435\u0441\u0443\u0440\u0441 Namespace.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0440\u043e\u043b\u0435\u0439 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443 ClusterRoleBinding, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u0435\u0435 \u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442.<\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043a\u0440\u043e\u043c\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043d\u0435\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041c\u043e\u0434\u0443\u043b\u0438 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<p><u>\u041b\u0438\u0441\u0442\u0438\u043d\u0433 ClusterRole<\/u><\/p>\n<pre><code class=\"yaml\">apiVersion: rbac.authorization.k8s.io\/v1 kind: ClusterRole metadata:   # \"namespace\" \u043e\u043f\u0443\u0449\u0435\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 ClusterRoles \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d   name: secret-reader rules: - apiGroups: [\"\"]    # \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 HTTP \u0438\u043c\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a Secret    # \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 - \u044d\u0442\u043e \"\u0441\u0435\u043a\u0440\u0435\u0442\u044b\"   resources: [\"secrets\"]   verbs: [\"get\", \"watch\", \"list\"]<\/code><\/pre>\n<h2>ClusterRoleBinding <\/h2>\n<p>ClusterRoleBinding &#8212; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0445 \u0440\u043e\u043b\u0435\u0439 (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u0431\u0435\u0437 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0432\u0430 \u0438\u043c\u0435\u043d \u0438\u043b\u0438 \u043d\u0435\u0440\u0435\u0441\u0443\u0440\u0441\u043d\u044b\u043c URL-\u043f\u0443\u0442\u044f\u043c)<\/p>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043d\u0435\u0440\u0435\u0441\u0443\u0440\u0441\u043d\u044b\u043c URL-\u043f\u0443\u0442\u044f\u043c \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u044f\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c (\u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u0443\u044e \u0440\u043e\u043b\u044c \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u0443\u044e \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443 \u0440\u043e\u043b\u0438 system:discovery.<br \/>\u0414\u043b\u044f \u043d\u0435\u0440\u0435\u0441\u0443\u0440\u0441\u043d\u044b\u0445 URL-\u043f\u0443\u0442\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u044b put, post, patch.<\/p>\n<p><u>\u041b\u0438\u0441\u0442\u0438\u043d\u0433 ClusterRoleBinding<\/u><\/p>\n<pre><code class=\"yaml\">apiVersion: rbac.authorization.k8s.io\/v1 # \u042d\u0442\u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0440\u043e\u043b\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u044e\u0431\u043e\u043c\u0443 \u0447\u043b\u0435\u043d\u0443 \u0433\u0440\u0443\u043f\u043f\u044b \u00abmanager\u00bb \u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0435\u043a\u0440\u0435\u0442\u044b \u0432 \u043b\u044e\u0431\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d. kind: ClusterRoleBinding metadata:   name: read-secrets-global subjects: - kind: Group   name: manager # \u0438\u043c\u044f \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443   apiGroup: rbac.authorization.k8s.io roleRef:   kind: ClusterRole   name: secret-reader   apiGroup: rbac.authorization.k8s.io<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/568\/045\/e52\/568045e5213f02a09776b8aff43480bd.png\" alt=\"\u041d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044b \u0434\u0432\u0430 \u0432\u0430\u0436\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u0430:1. \u041a \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0435 \u0440\u043e\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d.2. \u0420\u043e\u043b\u044c \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 \u0438\u043c\u0435\u043d (pod \u0438\u0437 ns cucumber) \u043b\u0438\u0431\u043e \u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0431\u0435\u0437 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d (persistentVolume).\" title=\"\u041d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044b \u0434\u0432\u0430 \u0432\u0430\u0436\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u0430:1. \u041a \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0435 \u0440\u043e\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d.2. \u0420\u043e\u043b\u044c \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 \u0438\u043c\u0435\u043d (pod \u0438\u0437 ns cucumber) \u043b\u0438\u0431\u043e \u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0431\u0435\u0437 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d (persistentVolume).\" width=\"2433\" height=\"1113\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/568\/045\/e52\/568045e5213f02a09776b8aff43480bd.png\"\/><\/p>\n<div><figcaption>\u041d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044b \u0434\u0432\u0430 \u0432\u0430\u0436\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u0430:<br \/>1. \u041a \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0435 \u0440\u043e\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d.<br \/>2. \u0420\u043e\u043b\u044c \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 \u0438\u043c\u0435\u043d (pod \u0438\u0437 ns cucumber) \u043b\u0438\u0431\u043e \u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0431\u0435\u0437 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d (persistentVolume).<\/figcaption><\/div>\n<\/figure>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041f\u0440\u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u0440\u043e\u043b\u0435\u0439 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439. \u0425\u043e\u0440\u043e\u0448\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u043d\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u043e\u0439 \u0440\u043e\u043b\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f  \u0438\u043b\u0438 \u043d\u0430\u0431\u043e\u0440\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439. \u041e\u0431\u044b\u0447\u043d\u043e \u043c\u043e\u0434\u0443\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0434 \u0423\u0417 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d. \u041a\u0430\u0436\u0434\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0430\u0431\u043e\u0440 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0445 \u0440\u043e\u043b\u0435\u0439 \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0445 \u043f\u0440\u0438\u0432\u044f\u0437\u043e\u043a \u0440\u043e\u043b\u0435\u0439, \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<p>\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0440\u0430\u0442\u043a\u0438\u043c \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0440\u043e\u043c \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u0439, \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0437\u0443\u044e\u0449\u0438\u0445 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0432 Kubernetes \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u043f\u043e\u043d\u044f\u0442\u0438\u044f\u043c\u0438, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a serviceAccount, RBAC, Role, RoleBinding, ClusterRole \u0438 ClusterRoleBinding.<\/p>\n<h2>\u041b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0430<\/h2>\n<ul>\n<li>\n<p>\u00abKubernetes \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438\u00bb &#8212; \u041c\u0430\u0440\u043a\u043e \u041b\u0443\u043a\u0448\u0430<\/p>\n<\/li>\n<li>\n<p>\u00abProgramming Kubernetes\u00bb &#8212; Michael Hausenbals &amp; Stefan Schimanski<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/kubernetes.io\/docs\/reference\/access-authn-authz\/rbac\/\" rel=\"noopener noreferrer nofollow\">Using RBAC Authorization<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/kubernetes.io\/docs\/concepts\/configuration\/secret\/#configure-least-privilege-access-to-secrets\" rel=\"noopener noreferrer nofollow\">Configure least-privilege access to Secrets<\/a><\/p>\n<\/li>\n<\/ul>\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\/779190\/\"> https:\/\/habr.com\/ru\/articles\/779190\/<\/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>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043a\u0440\u0430\u0442\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f k8s, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0443\u0447\u0435\u0442\u043d\u044b\u043c\u0438 \u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u044b \u0438 \u0441\u0435\u043a\u0440\u0435\u0442\u044b \u0432 \u0438\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043b\u0430\u0433\u0438\u043d \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c RBAC;<\/p>\n<\/li>\n<li>\n<p>\u0440\u043e\u043b\u0438 \u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u0440\u043e\u043b\u0435\u0439.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/figcaption><\/div>\n<\/figure>\n<p>Kubernetes \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0435\u0442 \u0434\u0432\u0430 \u0432\u0438\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 API:<\/p>\n<ul>\n<li>\n<p>\u0420\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043b\u044e\u0434\u0438 (\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438) &#8212; \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, SSO. \u0414\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b CRUD (create, read, update, delete) \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c API \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d.<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0434\u0443\u043b\u0438 (\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f) &#8212; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u043b\u0443\u0436\u0431, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u043a\u0430\u043a \u0440\u0435\u0441\u0443\u0440\u0441\u044b ServiceAccount.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 API \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u041a\u043e\u0433\u0434\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 API \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441, \u043e\u043d \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044f. \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0437\u0432\u043b\u0435\u043a \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u044f\u0434\u0440\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 API \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0433\u0440\u0443\u043f\u043f\u044b, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u043a\u043b\u0438\u0435\u043d\u0442. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 API.<\/p>\n<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ul>\n<li>\n<p>\u0438\u0437 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0438\u0437 \u0442\u043e\u043a\u0435\u043d\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e HTTP;<\/p>\n<\/li>\n<li>\n<p>\u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 HTTP-\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0413\u0440\u0443\u043f\u043f\u044b<\/h2>\n<p>\u0412 Kubernetes \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c\u0435\u044e\u0442 \u043e\u0441\u043e\u0431\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>system:unauthenticated &#8212; \u043d\u0435\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442;<\/p>\n<\/li>\n<li>\n<p>system:authenticated &#8212; \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442;<\/p>\n<\/li>\n<li>\n<p>system:serviceaccounts &#8212; \u0432\u0441\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>system:serviceaccounts:- \u0432\u0441\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d.<\/p>\n<\/li>\n<\/ul>\n<h2>ServiceAccount<\/h2>\n<p>ServiceAccount &#8212; \u043e\u0431\u044a\u0435\u043a\u0442, \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0441\u043b\u0443\u0436\u0431\u044b \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f (pod-\u0430).<br \/> \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c, \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u044f\u0441\u044c, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442  \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 <em>\/var\/run\/secrets\/kubernetes.io\/serviceaccount\/token<\/em> (\u0444\u0430\u0439\u043b \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043c secret). \u042d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u043e\u043a\u0435\u043d \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 ServiceAccount.<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u044d\u0442\u043e\u0442 \u0442\u043e\u043a\u0435\u043d \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 API, \u043f\u043b\u0430\u0433\u0438\u043d \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 ServiceAccount \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u044f\u0434\u0440\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 API. \u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f ServiceAccount \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: <em>system:serviceaccount::&lt;\u0438\u043c\u044f \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u043b\u0443\u0436\u0431\u044b><\/em>.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 API \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442, \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0423\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c (\u0423\u0417) \u0441\u043b\u0443\u0436\u0431\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<br \/>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c ServiceAccount \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u041a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c (pod) \u0441\u0432\u044f\u0437\u0430\u043d \u0440\u043e\u0432\u043d\u043e \u0441 \u043e\u0434\u043d\u043e\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u0441\u043b\u0443\u0436\u0431\u044b, \u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c. \u041c\u043e\u0434\u0443\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c ServiceAccount \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d (namespace).<\/p>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0423\u0417 ServiceAccount \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044f\u043c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u044f \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435: <em>spec.serviceAccountName<\/em>.<\/p>\n<h2>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f ServiceAccount<\/h2>\n<p>\u041d\u0430\u0437\u043d\u0430\u0447\u0430\u044f \u043c\u043e\u0434\u0443\u043b\u044f\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0423\u0417 \u0441\u043b\u0443\u0436\u0431, \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e, \u043a \u043a\u0430\u043a\u0438\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u0438\u043c\u0435\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c. \u041a\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u0440\u043e\u0441, \u043d\u0435\u0441\u0443\u0449\u0438\u0439 \u0432 \u0441\u0435\u0431\u0435 \u0442\u043e\u043a\u0435\u043d \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 API, \u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u044d\u0442\u043e\u0442 \u0442\u043e\u043a\u0435\u043d \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d \u043b\u0438 \u0435\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u0421\u0435\u0440\u0432\u0435\u0440 API \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0442 \u043e\u0431\u0449\u0435\u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f RBAC (role-based access control).<\/p>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u0432\u043e\u044f \u0423\u0417 ServiceAccount, \u043d\u043e \u0434\u043b\u044f \u0440\u0430\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438. \u0422\u043e\u043a\u0435\u043d\u044b \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u044f\u0445 \u0441\u043b\u0443\u0436\u0431 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u043c\u0430\u0440\u043a\u0435\u0440\u044b JWT.<\/p>\n<h2>\u041c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u044b \u0423\u0417 \u0441\u043b\u0443\u0436\u0431\u044b<\/h2>\n<p>\u0422\u043e\u043a\u0435\u043d \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432 (mountable secrets). \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043c\u043e\u0434\u0443\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0441\u0435\u043a\u0440\u0435\u0442.<\/p>\n<p>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0423\u0417 \u0441\u043b\u0443\u0436\u0431\u044b \u0442\u0438\u043f\u0430:<br \/><em>kubernetes.io\/enforce-mountable-secrets=\u201ctrue<\/em>\u201d \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432 \u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u044e \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u043a\u0430\u043a \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0432 \u0423\u0417 \u0441\u043b\u0443\u0436\u0431\u044b (mountable secrets).<\/p>\n<h2>\u0421\u0435\u043a\u0440\u0435\u0442\u044b \u0423\u0417 \u0434\u043b\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432<\/h2>\n<p>\u0423\u0417 ServiceAccount \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432 \u0441 \u0443\u0447\u0435\u0442\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0438\u0437 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 (image pull secrets). \u042d\u0442\u0438 \u0441\u0435\u043a\u0440\u0435\u0442\u044b \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442, \u043a\u0430\u043a\u0438\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u044b \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u043c. \u041e\u043d\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442, \u043a\u0430\u043a\u0438\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u043e \u0432\u0441\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<p><u>\u041b\u0438\u0441\u0442\u0438\u043d\u0433 ServiceAccount<\/u><\/p>\n<pre><code class=\"yaml\">apiVersion: v1 kind: ServiceAccount metadata:   annotations:     kubernetes.io\/enforce-mountable-secrets: \"true\"   name: my-serviceaccount   namespace: my-namespace imagePullSecrets: - name: regcred # \u044d\u0442\u0438 \u0441\u0435\u043a\u0440\u0435\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043e \u0432\u0441\u0435 \u043c\u043e\u0434\u0443\u043b\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0435 \u044d\u0442\u0443 \u0423\u0417<\/code><\/pre>\n<h2>\u041f\u043b\u0430\u0433\u0438\u043d RBAC<\/h2>\n<p>\u041f\u043b\u0430\u0433\u0438\u043d RBAC &#8212; \u044d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 Kubernetes. \u041e\u043d \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0438\u043b\u0438 \u043a \u043d\u0435\u0440\u0435\u0441\u0443\u0440\u0441\u043d\u044b\u043c \u043f\u0443\u0442\u044f\u043c (\/api, \/health, etc).<\/p>\n<p>\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 RBAC \u0432\u044b\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>Role (\u0434\u043b\u044f namespace), ClusterRole (\u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430) \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0438 \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0435.<\/p>\n<\/li>\n<li>\n<p>RoleBinding, ClusterRoleBinding &#8212; \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u0440\u043e\u043b\u0438 \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0433\u0440\u0443\u043f\u043f\u0430\u043c, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u043c \u0423\u0417.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0440\u043e\u043b\u0438 \u0443\u0440\u043e\u0432\u043d\u044f namespace &#8212; RoleBinding \u043c\u043e\u0436\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u0443\u044e \u0440\u043e\u043b\u044c ClusterRole, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d. \u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u043e\u0439 \u0440\u043e\u043b\u0438 ClusterRoleBinding \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0440\u043e\u043b\u044c \u0443\u0440\u043e\u0432\u043d\u044f \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d Role.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f: \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0440\u043e\u043b\u0438 \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0440\u043e\u043b\u044c (\u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d); \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u043e\u0439 \u0440\u043e\u043b\u0438 \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u0443\u044e \u0440\u043e\u043b\u044c (\u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0443\u0440\u043e\u0432\u043d\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438 \u043d\u0435\u0440\u0435\u0441\u0443\u0440\u0441\u043d\u044b\u0445 URL-\u043f\u0443\u0442\u0435\u0439)<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\">\n<div><figcaption>\u041d\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0440\u043e\u043b\u0438 \u043c\u043e\u0436\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u0443\u044e \u0440\u043e\u043b\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u043e\u043b\u044c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d, \u043a\u043e \u0432\u0441\u0435\u043c\u0443 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443; \u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u043e\u0439 \u0440\u043e\u043b\u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0440\u043e\u043b\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d, \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u043e\u043b\u044c \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d<\/figcaption><\/div>\n<\/figure>\n<p>\u0421 RBAC \u043c\u043e\u0433\u0443\u0442 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c, \u0438, \u0435\u0441\u043b\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f.<\/p>\n<h2>Role<\/h2>\n<p>Role RBAC (\u0438 ClusterRole) \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u043d\u0430\u0431\u043e\u0440 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439. \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0430\u0434\u0434\u0438\u0442\u0438\u0432\u043d\u044b\u043c\u0438 (\u043f\u0440\u0430\u0432\u0438\u043b \u00abdeny\u00bb \u043d\u0435\u0442). \u0415\u0441\u043b\u0438 \u0434\u043b\u044f \u0440\u043e\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d namespace, \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0438\u0439.<\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u0440\u043e\u043b\u044c, \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e apiGroup, \u0438 \u043d\u0435\u043b\u044c\u0437\u044f \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u0440\u043e\u043b\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 apiGroup, \u0440\u043e\u043b\u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 apiGroup.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430\u043c \u0441\u043b\u0443\u0436\u0431, \u0443\u043a\u0430\u0437\u0430\u0432 \u0438\u0445 \u0438\u043c\u0435\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 resourceNames.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u043e\u043b\u0438 \u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0439 \u0423\u0417 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d.<\/p>\n<p><u>\u041b\u0438\u0441\u0442\u0438\u043d\u0433 Role<\/u><\/p>\n<pre><code class=\"yaml\">apiVersion: rbac.authorization.k8s.io\/v1 kind: Role metadata:   namespace: default   name: pod-reader rules: - apiGroups: [\"\"] # \u043f\u0443\u0441\u0442\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438 \"\" \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u043d\u0435\u0432\u0430\u044f API group   resources: [\"pods\"]   verbs: [\"get\", \"watch\", \"list\"]<\/code><\/pre>\n<h2>RoleBinding<\/h2>\n<p>\u200b\u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0440\u043e\u043b\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u0440\u043e\u043b\u0438, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0438\u043b\u0438 \u0433\u0440\u0443\u043f\u043f\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041e\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0433\u0440\u0443\u043f\u043f \u0438\u043b\u0438 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0441\u043b\u0443\u0436\u0431) \u0438 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u0443\u044e \u0440\u043e\u043b\u044c. <\/p>\n<p>\u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0440\u043e\u043b\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0434\u043d\u0443 \u0440\u043e\u043b\u044c, \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0434\u0430\u0436\u0435 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 \u0438\u043c\u0435\u043d (namespace). RoleBinding \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u0443\u0440\u043e\u0432\u043d\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<p><u>\u041b\u0438\u0441\u0442\u0438\u043d\u0433 RoleBinding<\/u><\/p>\n<pre><code class=\"yaml\">apiVersion: rbac.authorization.k8s.io\/v1 # \u042d\u0442\u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0440\u043e\u043b\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u00ab\u0414\u0436\u0435\u0439\u043d\u00bb \u0447\u0438\u0442\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d \u00ab\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e\u00bb. # \u0423 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0440\u043e\u043b\u044c \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u00abpod-reader\u00bb \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d. kind: RoleBinding metadata:   name: read-pods   namespace: default subjects: # \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u00ab\u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0430\u00bb - kind: User   name: jane # \u043f\u043e\u043b\u0435 \"name\" \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443   apiGroup: rbac.authorization.k8s.io roleRef:   # \"roleRef\" \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443 \u043a Role\/ClusterRole   kind: Role # \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c Role \u0438\u043b\u0438 ClusterRole   name: pod-reader # \u044d\u0442\u043e \u0438\u043c\u044f \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0440\u043e\u043b\u0438 \u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u043e\u0439 \u0440\u043e\u043b\u0438, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443 \u0440\u043e\u043b\u0438   apiGroup: rbac.authorization.k8s.io<\/code><\/pre>\n<h2>ClusterRole<\/h2>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 \u0438\u043c\u0435\u043d, \u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 URL-\u043f\u0443\u0442\u0438 \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438. \u0414\u043b\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043d\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0435 \u0440\u043e\u043b\u0438. \u041e\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0443, \u0438\u043c\u0435\u044e\u0449\u0435\u043c\u0443 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d, \u0432\u043e \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430\u0445 \u0438\u043c\u0435\u043d. <\/p>\n<p>\u041a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0435 \u0440\u043e\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u044b \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u043e\u0439 RoleBinding, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u044d\u0442\u0438\u0445 \u0440\u043e\u043b\u0435\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d.<\/p>\n<p><strong>\u041a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0435 \u0440\u043e\u043b\u0438 k8s:<\/strong><\/p>\n<ul>\n<li>\n<p>View &#8212; \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043a\u0440\u043e\u043c\u0435 \u0440\u043e\u043b\u0435\u0439, \u043f\u0440\u0438\u0432\u044f\u0437\u043e\u043a \u0440\u043e\u043b\u0435\u0439 \u0438 \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432 (\u0441 \u0446\u0435\u043b\u044c\u044e \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0441\u043a\u0430\u043b\u0430\u0446\u0438\u044e \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439)<\/p>\n<\/li>\n<li>\n<p>Edit &#8212; \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u044b; \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432, \u043d\u043e \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u044b \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0440\u043e\u043b\u0435\u0439, \u043f\u0440\u0438\u0432\u044f\u0437\u043e\u043a \u0440\u043e\u043b\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p>Admin &#8212; \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043d\u0430\u0434 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e\u043c \u0438\u043c\u0435\u043d. \u0417\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441 ResourceQuota \u0438 \u0440\u0435\u0441\u0443\u0440\u0441 Namespace. \u0421\u0435\u0440\u0432\u0435\u0440 API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0440\u043e\u043b\u0438, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0438\u043c\u0435\u044e\u0442 \u0432\u0441\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u044d\u0442\u043e\u0439 \u0440\u043e\u043b\u0438 (\u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439).<\/p>\n<\/li>\n<li>\n<p>Cluster-Admin &#8212; \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0435, \u0447\u0442\u043e \u0438 Admin, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441 ResourceQuota \u0438 \u0440\u0435\u0441\u0443\u0440\u0441 Namespace.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0440\u043e\u043b\u0435\u0439 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443 ClusterRoleBinding, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u0435\u0435 \u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442.<\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043a\u0440\u043e\u043c\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043d\u0435\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041c\u043e\u0434\u0443\u043b\u0438 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<p><u>\u041b\u0438\u0441\u0442\u0438\u043d\u0433 ClusterRole<\/u><\/p>\n<pre><code class=\"yaml\">apiVersion: rbac.authorization.k8s.io\/v1 kind: ClusterRole metadata:   # \"namespace\" \u043e\u043f\u0443\u0449\u0435\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 ClusterRoles \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d   name: secret-reader rules: - apiGroups: [\"\"]    # \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e<\/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-362330","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/362330","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=362330"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/362330\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=362330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=362330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=362330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}