{"id":20271,"date":"2020-01-15T18:54:52","date_gmt":"2020-01-15T09:54:52","guid":{"rendered":"https:\/\/labs.gree.jp\/blog\/?p=20271"},"modified":"2020-02-14T16:03:09","modified_gmt":"2020-02-14T07:03:09","slug":"eks","status":"publish","type":"post","link":"https:\/\/labs.gree.jp\/blog\/2020\/01\/20271\/","title":{"rendered":"\u30b9\u30de\u30db\u30b2\u30fc\u30e0\u306e API \u30b5\u30fc\u30d0\u306b\u304a\u3051\u308b EKS \u306e\u904b\u7528\u4e8b\u4f8b"},"content":{"rendered":"<h1 id=\"anker1\"><span style=\"font-weight: 400;\">\u306f\u3058\u3081\u306b<\/span><\/h1>\n<p><span style=\"font-weight: 400;\">\u3053\u3093\u306b\u3061\u306f\u3001\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u90e8\u306e\u52a0\u85e4\u3067\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u3053\u306e\u5ea6\u3001\u65b0\u898f\u30b9\u30de\u30db\u30b2\u30fc\u30e0\u306e API \u30b5\u30fc\u30d0\u306e\u90e8\u5206\u3067 Amazon Elastic Kubernetes Service (EKS) \u3092\u4f7f\u3063\u305f\u3082\u306e\u304c\u6b63\u5f0f\u30ea\u30ea\u30fc\u30b9\u3057\u307e\u3057\u305f\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u30c1\u30fc\u30e0\u3068\u3057\u3066\u306f Kubernetes \u306e\u6848\u4ef6\u306f\u4eca\u56de\u304c5\u4ef6\u76ee\u3067\u3001EKS \u5229\u7528\u306f\u521d\u306e\u8a66\u307f\u3068\u306a\u308a\u307e\u3057\u305f\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u30b2\u30fc\u30e0\u540d\u306f\u975e\u516c\u958b\u306e\u305f\u3081\u8a18\u4e8b\u30bf\u30a4\u30c8\u30eb\u306e\u4e3b\u8a9e\u304c\u5927\u304d\u304f\u6050\u7e2e\u3067\u3059\u304c\u3001\u30ea\u30ea\u30fc\u30b9\u5f8c\u306e\u5bfe\u5fdc\u3082\u843d\u3061\u7740\u3044\u3066\u304d\u307e\u3057\u305f\u306e\u3067\u672c\u30d7\u30ed\u30c0\u30af\u30c8\u306b\u304a\u3051\u308b\u73fe\u6642\u70b9\u3067\u306e\u77e5\u898b\u3092\u5171\u6709\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u9577\u304f\u306a\u308b\u305f\u3081\u3001\u7528\u8a9e\u3084 Kubernetes \u306e\u4f7f\u3044\u65b9\u306e\u8aac\u660e\u306f\u7701\u7565\u3057\u307e\u3059\u304c\u3001EKS (Kubernetes) \u30af\u30e9\u30b9\u30bf\u3092\u904b\u7528\u3059\u308b\u5074\u3068\u3057\u3066\u3001\u3069\u3046\u3044\u3063\u305f\u691c\u8a0e\u3084\u5bfe\u5fdc\u304c\u5fc5\u8981\u3060\u3063\u305f\u304b\u306a\u3069\u306b\u3064\u3044\u3066\u3054\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u554f\u984c\u306b\u5bfe\u3059\u308b\u624b\u6cd5\u306f\u5bfe\u8c61\u306e\u30b7\u30b9\u30c6\u30e0\u3084\u7d44\u7e54\u306b\u3088\u3063\u3066\u6700\u9069\u306a\u65b9\u6cd5\u304c\u7570\u306a\u308b\u53ef\u80fd\u6027\u304c\u9ad8\u3044\u306e\u3067\u3042\u304f\u307e\u3067\u53c2\u8003\u7a0b\u5ea6\u3068\u3057\u3066\u9802\u3051\u308c\u3070\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u3053\u308c\u304b\u3089 EKS \u3092\u4f7f\u3063\u305f\u30b7\u30b9\u30c6\u30e0\u306e\u904b\u7528\u3092\u691c\u8a0e\u3055\u308c\u3066\u3044\u308b\u65b9\u306e\u4e00\u52a9\u306b\u306a\u308a\u307e\u3057\u305f\u3089\u5e78\u3044\u3067\u3059\u3002<\/span><\/p>\n<p>2020\/02\/14\u8ffd\u8a18: \u56f3\u3092\u3044\u304f\u3064\u304b\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002<\/p>\n<h1 id=\"anker2\"><span style=\"font-weight: 400;\">TL; DR<\/span><\/h1>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Kubernetes \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u306f3\u30f6\u6708\u3054\u3068\u306b\u3084\u3063\u3066\u304d\u307e\u3059\u3002\u5f93\u6765\u306e OS \u3084\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3068\u9055\u3063\u3066\u5468\u671f\u304c\u77ed\u3044\u305f\u3081\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u306e\u904b\u7528\u3092\u56de\u305b\u308b\u304b\u5c0e\u5165\u524d\u306b\u691c\u8a0e\u3057\u307e\u3057\u3087\u3046<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">AWS ALB Ingress Controller \u3092\u4f7f\u3046\u5834\u5408\u3001API \u306e\u30ea\u30c8\u30e9\u30a4\u56de\u6570\u306a\u3069\u9069\u5207\u306a\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3057\u3087\u3046<\/span><\/li>\n<\/ul>\n<h1 id=\"anker3\"><span style=\"font-weight: 400;\">\u76ee\u6b21<\/span><\/h1>\n<ul>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker1\">\u306f\u3058\u3081\u306b<\/a><\/li>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker2\">TL; DR<\/a><\/li>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker3\">\u76ee\u6b21<\/a><\/li>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker4\">\u30b7\u30b9\u30c6\u30e0\u69cb\u6210<\/a>\n<ul>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker41\">\u5165\u308c\u3066\u3044\u308bKubernetes \u30a2\u30c9\u30aa\u30f3<\/a><\/li>\n<\/ul>\n<\/li>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker5\">\u5c0e\u5165\u6642\u306b\u691c\u8a0e\u3057\u305f\u3053\u3068<\/a>\n<ul>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker51\">\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8 IP \u30a2\u30c9\u30ec\u30b9\u306f\u3069\u306e\u304f\u3089\u3044\u3042\u308c\u3070\u826f\u3044\u306e\u304b\uff1f<\/a>\n<ul>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker511\">\u904b\u7528\u3092\u958b\u59cb\u3057\u305f\u5f8c\u306f\u3069\u3046\u3059\u308c\u3070\u826f\u3044\u304b\uff1f<\/a><\/li>\n<\/ul>\n<\/li>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker52\">\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u3092\u5b89\u5168\u306b\u524a\u9664\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308b\u304b\uff1f<\/a>\n<ul>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker521\">Kubernetes \u306e Drain<\/a><\/li>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker522\">\u30ed\u30b0\u56de\u53ce\u306e\u78ba\u8a8d<\/a><\/li>\n<\/ul>\n<\/li>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker53\">\u30aa\u30fc\u30c8\u30b9\u30b1\u30fc\u30eb\u306f\u3069\u3046\u3059\u308b\u304b\uff1f<\/a><\/li>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker54\">\u30d0\u30c3\u30c1\u51e6\u7406\u3092\u3069\u3046\u9694\u96e2\u3059\u308b\u304b\uff1f<\/a><\/li>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker55\">Kubernetes (EKS) \u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u306f\u3069\u3046\u3057\u3066\u3044\u304f\u304b\uff1f<\/a><\/li>\n<\/ul>\n<\/li>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker6\">\u8ca0\u8377\u8a66\u9a13\u4e2d\u3084\u904b\u7528\u958b\u59cb\u5f8c\u306b\u767a\u751f\u3057\u305f\u554f\u984c<\/a>\n<ul>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker61\">DNS \u306e\u540d\u524d\u89e3\u6c7a\u306b\u5931\u6557\u3059\u308b<\/a>\n<ul>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker611\">PHP + Apache \u7279\u6709\u306e\u4e8b\u60c5<\/a><\/li>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker612\">Kubernetes \u7279\u6709\u306e\u4e8b\u60c5<\/a><\/li>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker613\">AWS \u304c\u63d0\u4f9b\u3059\u308b VPC \u5185\u306e DNS \u30b5\u30fc\u30d0\u306e\u5236\u9650<\/a><\/li>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker614\">\u56de\u907f\u65b9\u6cd5<\/a><\/li>\n<\/ul>\n<\/li>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker62\">\u30ed\u30fc\u30ea\u30f3\u30b0\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u6642\u306b ELB 502 \u30a8\u30e9\u30fc\u304c\u591a\u767a\u3059\u308b<\/a>\n<ul>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker621\">Pod \u304c\u3059\u3050\u7d42\u4e86\u3057\u3066\u3057\u307e\u3063\u3066\u3001\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u304b\u3089\u524a\u9664\u3059\u308b\u51e6\u7406\u304c\u9593\u306b\u5408\u308f\u306a\u3044<\/a><\/li>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker622\">AWS API \u30b3\u30fc\u30eb\u304c\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u3057\u3066\u3001\u30bf\u30fc\u30b2\u30c3\u30c8\u30b0\u30eb\u30fc\u30d7\u304b\u3089\u524a\u9664\u3059\u308b\u51e6\u7406\u304c\u9045\u5ef6\u3059\u308b<\/a><\/li>\n<\/ul>\n<\/li>\n<li style=\"margin-bottom: 5px;\"><a href=\"#anker63\">\u4ed6\u306b\u3082<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#anker7\">\u304a\u308f\u308a\u306b<\/a><\/li>\n<\/ul>\n<h1 id=\"anker4\"><span style=\"font-weight: 400;\">\u30b7\u30b9\u30c6\u30e0\u69cb\u6210<\/span><\/h1>\n<p><span style=\"font-weight: 400;\">\u672c\u30d7\u30ed\u30c0\u30af\u30c8\u306e API \u30b5\u30fc\u30d0(\u4ee5\u4e0b\u3001\u5358\u306b API \u30b5\u30fc\u30d0\u3068\u8a18\u8f09\u3057\u307e\u3059)\u306e\u69cb\u6210\u306f\u3001\u3088\u304f\u3042\u308b \u30ed\u30fc\u30c9\u30d0\u30e9\u30f3\u30b5\u30fc + Web\/API \u30b5\u30fc\u30d0 + \u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306e\u30c7\u30fc\u30bf\u30b9\u30c8\u30a2 \u3068\u3044\u30463\u5c64\u306e\u30e2\u30ce\u30ea\u30b7\u30c3\u30af\u306a\u69cb\u6210\u3067\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u5229\u7528\u3057\u3066\u3044\u308b\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306f LAMP \u30b9\u30bf\u30c3\u30af\u3092\u7dad\u6301\u3057\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30a2\u30d7\u30ea\u304b\u3089\u306e API \u30ea\u30af\u30a8\u30b9\u30c8\u3092\u51e6\u7406\u3059\u308b\u30b5\u30fc\u30d0\u3068\u3057\u3066 PHP + Apache \u3092\u3001\u30c7\u30fc\u30bf\u30b9\u30c8\u30a2\u3068\u3057\u3066 Aurora(MySQL), Redis, Memcached \u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u4ee5\u4e0b\u306e\u56f3\u306f\u30af\u30e9\u30a6\u30c9\u306b\u5bc4\u3089\u305a\u5fc5\u8981\u3068\u306a\u308b\u69cb\u6210\u8981\u7d20\u3092\u63cf\u3044\u305f\u3082\u306e\u3067\u3001\u7d30\u304b\u3044\u3068\u3053\u308d\u306f\u7701\u7565\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3056\u3063\u304f\u308a\u8d64\u8272\u3067\u56f2\u3063\u305f\u90e8\u5206\u304c\u4eca\u56de Kubernetes \u3067\u7ba1\u7406\u3092\u884c\u3044\u305f\u3044\u90e8\u5206\u3067\u3059\u3002<\/span><\/p>\n<p><a href=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/image2019-12-26_15-51-48.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-20365 size-medium\" src=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/image2019-12-26_15-51-48-600x364.png\" alt=\"\" width=\"600\" height=\"364\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/image2019-12-26_15-51-48-600x364.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/image2019-12-26_15-51-48-276x167.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/image2019-12-26_15-51-48-768x465.png 768w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/image2019-12-26_15-51-48-830x503.png 830w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/image2019-12-26_15-51-48.png 1908w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u5b9f\u969b\u306b EKS(Kubernetes) \u3092\u7d44\u307f\u8fbc\u3093\u3060\u5f8c\u306e\u6700\u7d42\u7684\u306a\u30a4\u30f3\u30d5\u30e9\u69cb\u6210\u56f3\u304c\u3053\u3061\u3089\u3067\u3059\u3002<\/span><\/p>\n<p><a href=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/Untitled-1.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-20362 \" src=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/Untitled-1-600x386.png\" alt=\"\" width=\"600\" height=\"386\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/Untitled-1-600x386.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/Untitled-1-276x178.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/Untitled-1-768x494.png 768w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/Untitled-1-830x534.png 830w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/Untitled-1.png 1536w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u3053\u306e\u3088\u3046\u306a\u30b7\u30f3\u30d7\u30eb\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306a\u3089\u3070 ECS \u306e\u65b9\u304c\u9069\u3057\u3066\u3044\u308b\u3068\u3044\u3046\u4e8b\u5b9f\u306f\u3042\u308a\u3064\u3064\u3082\u3001\u4eca\u56de\u306f\u3069\u306e\u30d1\u30d6\u30ea\u30c3\u30af\u30af\u30e9\u30a6\u30c9\u3092\u4f7f\u3046\u306e\u304b\u6c7a\u3081\u308b\u306e\u306b\u6642\u9593\u3092\u304b\u3051\u3066\u3044\u305f\u90e8\u5206\u3082\u3042\u3063\u305f\u306e\u3067\u3069\u3061\u3089\u306b\u8ee2\u3093\u3067\u3082\u826f\u3044\u3088\u3046\u306b Kubernetes \u3067\u6e96\u5099\u3092\u9032\u3081\u3066\u304a\u308a\u3001\u6700\u7d42\u7684\u306b\u306f EKS \u3092\u4f7f\u3063\u305f\u69cb\u6210\u3068\u306a\u308a\u307e\u3057\u305f\u3002<\/span><\/p>\n<h2 id=\"anker41\"><span style=\"font-weight: 400;\">\u5165\u308c\u3066\u3044\u308bKubernetes \u30a2\u30c9\u30aa\u30f3<\/span><\/h2>\n<h3><b>Helm<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">\u5f8c\u8ff0\u3059\u308b Metrics Server \u3084 AWS ALB Ingress Controller \u306a\u3069\u3092\u5165\u308c\u308b\u305f\u3081\u306b\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<h3><b>Metrics Server<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Kubernetes \u306e \u6c34\u5e73\u30aa\u30fc\u30c8\u30b9\u30b1\u30fc\u30eb(HPA)\u30ea\u30bd\u30fc\u30b9\u3092\u5229\u7528\u3057\u3066\u3001API \u30b5\u30fc\u30d0\u306e Deployments \u306e Pod \u6570\u3092\u30aa\u30fc\u30c8\u30b9\u30b1\u30fc\u30eb\u3059\u308b\u305f\u3081\u306b\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">HPA \u304c\u30aa\u30fc\u30c8\u30b9\u30b1\u30fc\u30eb\u3092\u5224\u65ad\u3059\u308b\u306e\u306b\u5fc5\u8981\u306a\u6307\u6a19(\u5404 Pod \u306e \u5272\u308a\u5f53\u3066CPU \u306b\u5bfe\u3059\u308b\u4f7f\u7528\u7387\u306a\u3069)\u3092\u53ce\u96c6\u3057\u307e\u3059\u3002<\/span><\/p>\n<h3><b>Cluster Autoscaler<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">EKS \u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306e\u30aa\u30fc\u30c8\u30b9\u30b1\u30fc\u30eb\u306e\u305f\u3081\u5229\u7528\u3057\u3066\u3044\u307e\u3059<\/span><\/p>\n<h3><b>AWS ALB Ingress Controller<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u306b\u3088\u308b ALB \u306e\u7ba1\u7406\u3084\u3001Kubernetes Deployments \u30ea\u30bd\u30fc\u30b9\u306e Rolling Update \u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u969b\u306b ALB Target Group \u3078\u306e Pod \u306e\u767b\u9332\u30fb\u524a\u9664\u3092\u884c\u3063\u3066\u3082\u3089\u3046\u305f\u3081\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<h1 id=\"anker5\"><span style=\"font-weight: 400;\">\u5c0e\u5165\u6642\u306b\u691c\u8a0e\u3057\u305f\u3053\u3068<\/span><\/h1>\n<h2 id=\"anker51\"><span style=\"font-weight: 400;\">\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8 IP \u30a2\u30c9\u30ec\u30b9\u306f\u3069\u306e\u304f\u3089\u3044\u3042\u308c\u3070\u826f\u3044\u306e\u304b\uff1f<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">\u672c\u30d7\u30ed\u30c0\u30af\u30c8\u3067\u306f\u30ea\u30ea\u30fc\u30b9\u6642\u30d4\u30fc\u30af\u3067 300 Pod, 100 \u30ce\u30fc\u30c9(c5.4xlarge)\u3050\u3089\u3044\u306e\u898f\u6a21\u3067\u3057\u305f\u304c\u3001\u4f7f\u7528\u3057\u3066\u3044\u308b\u30b5\u30d6\u30cd\u30c3\u30c8\u306e CIDR \u30d6\u30ed\u30c3\u30af\u5408\u8a08\u3067 \/20 (IP\u30a2\u30c9\u30ec\u30b94000\u500b\u7a0b\u5ea6)\u3060\u3068\u8db3\u308a\u306a\u3044\u3053\u3068\u3082\u3042\u308a\u307e\u3057\u305f\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u3053\u308c\u306f EKS \u306e\u30c7\u30d5\u30a9\u30eb\u30c8 CNI \u3067\u3042\u308b\u00a0 Amazon VPC CNI \u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4ed5\u69d8\u306b\u3088\u308b\u3082\u306e\u304c\u5927\u304d\u3044\u3067\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Amazon VPC CNI \u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3001\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306e\u3054\u3068\u306b\u8907\u6570\u306e Elastic Network Interface (ENI) \u3092\u5272\u308a\u5f53\u3066\u3066\u3001\u5404 ENI \u3054\u3068\u306b\u307e\u3068\u307e\u3063\u305f\u6570\u306e\u30bb\u30ab\u30f3\u30c0\u30ea IP \u30a2\u30c9\u30ec\u30b9\u3092\u5272\u308a\u5f53\u3066\u3001\u305d\u306e\u30bb\u30ab\u30f3\u30c0\u30ea IP \u30a2\u30c9\u30ec\u30b9\u306f\u305d\u306e\u30ce\u30fc\u30c9\u3067\u52d5\u4f5c\u3059\u308b Pod \u3078\u306e\u5272\u308a\u5f53\u3066\u7528\u3068\u3057\u3066\u78ba\u4fdd\u3057\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">Pod \u306e\u8d77\u52d5\u6642\u306f\u3001\u78ba\u4fdd\u3055\u308c\u305f\u30bb\u30ab\u30f3\u30c0\u30ea IP \u30a2\u30c9\u30ec\u30b9\u304c\u5272\u308a\u5f53\u3066\u3089\u308c\u3066\u3001Pod \u9593\u3084 VPC \u5185\u306e\u4ed6\u306e\u30b5\u30fc\u30d3\u30b9\u3068\u30cd\u30a4\u30c6\u30a3\u30d6\u3067\u901a\u4fe1\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><a href=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/Untitled-2.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-20486 size-medium\" src=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/Untitled-2-600x386.png\" alt=\"\" width=\"600\" height=\"386\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/Untitled-2-600x386.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/Untitled-2-276x178.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/Untitled-2-768x495.png 768w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/Untitled-2.png 784w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u305d\u3057\u3066 Amazon VPC CNI \u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3001Pod \u306e\u8d77\u52d5\u6642\u306b\u3059\u3050\u306b\u30bb\u30ab\u30f3\u30c0\u30ea IP \u30a2\u30c9\u30ec\u30b9\u3092\u5272\u308a\u5f53\u3066\u3067\u304d\u308b\u3088\u3046\u306b\u3001\u3042\u3089\u304b\u3058\u3081\u672a\u5272\u308a\u5f53\u3066\u306e\u30bb\u30ab\u30f3\u30c0\u30ea IP \u30a2\u30c9\u30ec\u30b9\u3092\u3042\u308b\u7a0b\u5ea6\u306e\u6570\u78ba\u4fdd\u3057\u3066\u304a\u304f\u4ed5\u69d8\u304c\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u3053\u306e\u4ed5\u69d8\u306e\u305f\u3081\u3001\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u8d77\u52d5\u6642\u306b\u307e\u3068\u307e\u3063\u305f\u6570\u306e IP \u30a2\u30c9\u30ec\u30b9\u304c\u78ba\u4fdd\u3055\u308c\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u8d77\u52d5\u6642\u306b\u78ba\u4fdd\u3059\u308b\u6570(\u30c7\u30d5\u30a9\u30eb\u30c8)\u306f\u3001\u4ee5\u4e0b\u306e\u8868\u306e\u3088\u3046\u306b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u30bf\u30a4\u30d7\u3054\u3068\u306b\u7570\u306a\u308a\u307e\u3059(*1) (2019\u5e7412\u6708\u73fe\u5728)<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u30bf\u30a4\u30d7<\/b><\/td>\n<td><b>\u8d77\u52d5\u6642\u306b\u78ba\u4fdd\u3055\u308c\u308b IP \u30a2\u30c9\u30ec\u30b9\u6570<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">c5.large<\/span><\/td>\n<td><span style=\"font-weight: 400;\">20<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">c5.xlarge<\/span><\/td>\n<td><span style=\"font-weight: 400;\">30<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">c5.2xlarge<\/span><\/td>\n<td><span style=\"font-weight: 400;\">30<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">c5.4xlarge<\/span><\/td>\n<td><span style=\"font-weight: 400;\">60<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">c5.9xlarge<\/span><\/td>\n<td><span style=\"font-weight: 400;\">60<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">m5.large<\/span><\/td>\n<td><span style=\"font-weight: 400;\">20<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">m5.xlarge<\/span><\/td>\n<td><span style=\"font-weight: 400;\">30<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">m5.2xlarge<\/span><\/td>\n<td><span style=\"font-weight: 400;\">30<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">m5.4xlarge<\/span><\/td>\n<td><span style=\"font-weight: 400;\">60<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">m5.8xlarge<\/span><\/td>\n<td><span style=\"font-weight: 400;\">60<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">*1 \u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f Pod \u306b\u5272\u308a\u5f53\u3066\u53ef\u80fd\u306a\u30bb\u30ab\u30f3\u30c0\u30ea IP \u30a2\u30c9\u30ec\u30b9\u3092 ENI 1\u500b\u5206(\u305d\u306e ENI \u306b\u5272\u308a\u5f53\u3066\u3067\u304d\u308b\u6700\u5927\u6570)\u78ba\u4fdd\u3059\u308b\u8a2d\u5b9a\u3067\u3059\u304c\u3001\u5b9f\u969b\u306b\u306f DaemonSet \u306a\u3069\u304c\u3042\u308a\u3059\u3050\u306b ENI 1\u500b\u5206\u306e\u7a7a\u304d\u3068\u3044\u3046\u6761\u4ef6\u306f\u6e80\u305f\u3055\u306a\u304f\u306a\u308b\u306e\u3067\u3001\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u8d77\u52d5\u6642\u306b ENI 2\u500b\u5206(\u300c\u305d\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u30bf\u30a4\u30d7\u304c ENI \u3054\u3068\u306b\u5272\u308a\u5f53\u3066\u3067\u304d\u308b IP \u30a2\u30c9\u30ec\u30b9\u6570\u300d\u306e2\u500d)\u304c\u78ba\u4fdd\u3055\u308c\u308b\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/span><span style=\"font-weight: 400;\">\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3068\u3057\u3066\u306f\u6b21\u306e\u30ea\u30f3\u30af\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<br \/>\n<\/span>\u53c2\u8003: <a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/eks\/latest\/userguide\/cni-env-vars.html\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">https:\/\/docs.aws.amazon.com\/ja_jp\/eks\/latest\/userguide\/cni-env-vars.html<\/span><\/a><br \/>\n\u53c2\u8003: <a href=\"https:\/\/github.com\/aws\/amazon-vpc-cni-k8s\/blob\/master\/docs\/cni-proposal.md\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">https:\/\/github.com\/aws\/amazon-vpc-cni-k8s\/blob\/master\/docs\/cni-proposal.md<\/span><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u4f8b\u3048\u3070\u3001\u30d4\u30fc\u30af\u6642\u306b c5.4xlarge \u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c 50 \u500b\u5fc5\u8981\u3068\u306a\u308b\u5834\u5408\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u6700\u4f4e\u3067\u3082\u00a0 60*50=3000 \u500b\u306e IP \u30a2\u30c9\u30ec\u30b9\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u306e\u3067\u3001<\/span><span style=\"font-weight: 400;\">3000 \u500b\u306e IP \u30a2\u30c9\u30ec\u30b9\u3092\u78ba\u4fdd\u3059\u308b\u306b\u306f\u5c11\u306a\u304f\u3068\u3082 \/20 \u306e CIDR \u30d6\u30ed\u30c3\u30af\u3092\u78ba\u4fdd\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\/16 \u306e CIDR \u30d6\u30ed\u30c3\u30af\u304c\u5272\u308a\u5f53\u3066\u3089\u308c\u3066\u3044\u308b\u30c7\u30d5\u30a9\u30eb\u30c8 VPC \u3092\u5229\u7528\u3059\u308b\u306a\u3089\u305f\u3044\u3066\u3044\u306f\u5341\u5206\u3060\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u4f55\u3089\u304b\u306e\u7406\u7531\u3067\u3088\u308a\u5c11\u306a\u3044 CIDR \u30d6\u30ed\u30c3\u30af\u3067 VPC \u8a2d\u8a08\u3057\u3066\u3044\u308b\u30b1\u30fc\u30b9\u3067\u306f\u5b9f\u969b\u306b IP \u30a2\u30c9\u30ec\u30b9\u304c\u8db3\u308a\u308b\u306e\u304b\u3069\u3046\u304b\u518d\u78ba\u8a8d\u3057\u305f\u65b9\u304c\u826f\u3055\u305d\u3046\u3067\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u6642\u5b63\u3084\u6642\u9593\u5e2f\u3001\u30a2\u30d9\u30a4\u30e9\u30d3\u30ea\u30c6\u30a3\u30be\u30fc\u30f3\u306b\u3088\u3063\u3066\u306f\u591a\u304f\u306e\u6570\u306e EC2 \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u78ba\u4fdd\u3057\u3065\u3089\u3044\u3053\u3068\u3082\u3042\u308b\u306e\u3067\u3001\u30b5\u30d6\u30cd\u30c3\u30c8\u9593\u3067\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u304c\u504f\u308b\u3053\u3068\u304c\u3042\u308b\u70b9\u3082\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/span><\/p>\n<h3 id=\"anker511\"><b>\u904b\u7528\u3092\u958b\u59cb\u3057\u305f\u5f8c\u306f\u3069\u3046\u3059\u308c\u3070\u826f\u3044\u304b\uff1f<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Amazon VPC CNI\u00a0 \u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u306f WARM_ENI_TARGET \u3084 WARM_IP_TARGET \u3068\u3044\u3046\u8a2d\u5b9a\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u3042\u308a\u3001\u3053\u308c\u306b\u3088\u3063\u3066\u8d77\u52d5\u6642\u306b\u78ba\u4fdd\u3059\u308b IP \u30a2\u30c9\u30ec\u30b9\u3092\u8abf\u6574\u53ef\u80fd\u306e\u3088\u3046\u3067\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u672c\u30d7\u30ed\u30c0\u30af\u30c8\u3067\u306f c5.4xlarge \u3067 IP \u30a2\u30c9\u30ec\u30b9\u304c\u8db3\u308a\u306a\u304f\u306a\u3063\u305f\u3068\u304d\u306f WARM_IP_TARGET \u3092\u8abf\u6574\u305b\u305a\u306b\u3001Pod \u306e Requests\/Limits Resource \u3092\u5927\u304d\u304f\u3057\u3064\u3064\u3001c5.9xlarge \u3092\u4f7f\u3046\u3053\u3068\u3067 IP \u30a2\u30c9\u30ec\u30b9\u3092\u7bc0\u7d04\u3057\u305f\u308a\u3057\u307e\u3057\u305f\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u307e\u305f\u3001VPC \u306b\u30bb\u30ab\u30f3\u30c0\u30ea\u306e CIDR \u30d6\u30ed\u30c3\u30af\u3092\u5272\u308a\u5f53\u3066\u3066\u3001\u5f8c\u304b\u3089\u65b0\u3057\u3044\u30b5\u30d6\u30cd\u30c3\u30c8\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">EKS \u30af\u30e9\u30b9\u30bf\u3092\u8ffd\u52a0\u3059\u308b\u969b\u3001\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u3092\u914d\u7f6e\u3059\u308b\u30b5\u30d6\u30cd\u30c3\u30c8\u306f\u9078\u629e\u3059\u308b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u3042\u308c\u306f RDS \u3084 ElastiCache \u306e\u30b5\u30d6\u30cd\u30c3\u30c8\u30b0\u30eb\u30fc\u30d7\u306e\u3088\u3046\u306a\u30a4\u30e1\u30fc\u30b8\u3067\u3001\u5404\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306e kubelet \u304c EKS \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d7\u30ec\u30fc\u30f3(Kubernetes \u306e API \u30b5\u30fc\u30d0)\u3068\u901a\u4fe1\u3059\u308b\u305f\u3081\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3068\u306a\u308b ENI \u304c\u914d\u7f6e\u3055\u308c\u308b\u30b5\u30d6\u30cd\u30c3\u30c8\u3092\u6307\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u305d\u306e\u305f\u3081\u3001\u5f8c\u304b\u3089\u540c\u3058 VPC \u5185\u306b\u30b5\u30d6\u30cd\u30c3\u30c8\u3092\u8ffd\u52a0\u3057\u3066\u3082\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30b0\u30eb\u30fc\u30d7\u304c\u9069\u5207\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308c\u3070\u3001\u5f8c\u304b\u3089\u8ffd\u52a0\u3055\u308c\u305f\u30b5\u30d6\u30cd\u30c3\u30c8\u306b\u7f6e\u3044\u305f\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u304b\u3089 EKS \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d7\u30ec\u30fc\u30f3\u306b\u306f\u554f\u984c\u306a\u304f\u758e\u901a\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n<h2 id=\"anker52\"><span style=\"font-weight: 400;\">\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u3092\u5b89\u5168\u306b\u524a\u9664\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308b\u304b\uff1f<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">\u6700\u8fd1(2019\u5e74\u306e re:Invent \u4ed8\u8fd1\u3067)\u767a\u8868\u3055\u308c\u305f EKS \u306e\u30ce\u30fc\u30c9\u95a2\u9023\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3067\u3042\u308b Managed Node Groups \u3084 EKS on Fargate \u306f\u672c\u30d7\u30ed\u30c0\u30af\u30c8\u306e\u30ea\u30ea\u30fc\u30b9\u6642\u70b9\u3067\u306f\u9593\u306b\u5408\u308f\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u4eca\u56de\u306f\u975e\u30de\u30cd\u30fc\u30b8\u30c9\u306a\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306e\u7ba1\u7406\u306b\u3064\u3044\u3066\u89e6\u308c\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306f EC2 \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306a\u306e\u3067 Reboot \u3084 Retirement \u306e Scheduled Event \u304c\u767a\u751f\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3057\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u30bf\u30a4\u30d7\u3092\u5909\u66f4\u3057\u305f\u3044\u3068\u3044\u3063\u305f\u30b1\u30fc\u30b9\u3082\u51fa\u3066\u304f\u308b\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306f Auto Scaling \u30b0\u30eb\u30fc\u30d7(ASG) \u7ba1\u7406\u306a\u308f\u3051\u3067\u3059\u304b\u3089\u3001\u305d\u3046\u3044\u3063\u305f\u3068\u304d\u306f\u6c17\u8efd\u306b ASG \u306e\u30d8\u30eb\u30b9\u30c1\u30a7\u30c3\u30af\u3092 Unhealthy \u306b\u3057\u3066\u3001\u65b0\u3057\u3044\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u7f6e\u304d\u63db\u3048\u3089\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u4fbf\u5229\u3067\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u3092\u5b89\u5168\u306b\u524a\u9664\u3059\u308b\u306b\u306f\u3001Kubernetes \u306e Drain \u3084\u30ed\u30b0\u306e\u56de\u53ce\u3092\u78ba\u5b9f\u306b\u884c\u3063\u3066\u304b\u3089\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u7d42\u4e86\u3057\u3066\u3082\u3089\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3057\u305f\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">ASG \u306f\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u30d5\u30c3\u30af\u306e\u5b9f\u884c\u5b8c\u4e86\u3092\u5f85\u3063\u3066\u304b\u3089\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u7d42\u4e86\u306b\u79fb\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3001\u305d\u306e\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u30d5\u30c3\u30af\u306e\u4e2d\u3067\u305d\u308c\u3089\u306e\u51e6\u7406\u3092\u884c\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<h3 id=\"anker521\"><b>Kubernetes \u306e Drain<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Kubernetes \u306e Drain \u306f\u3001\u30ce\u30fc\u30c9\u3092\u505c\u6b62\u3055\u305b\u308b\u524d\u6bb5\u968e\u3068\u3057\u3066\u3001\u305d\u306e\u30ce\u30fc\u30c9\u3078\u306e\u65b0\u898f Pod \u306e\u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u3092\u3067\u304d\u306a\u3044\u3088\u3046\u306b\u3057\u305f\u4e0a\u3067\u3001\u305d\u306e\u30ce\u30fc\u30c9\u4e0a\u3067\u65e2\u306b\u52d5\u3044\u3066\u3044\u308b Pod \u3092\u8ffd\u3044\u51fa\u3059\u6a5f\u80fd\u3067\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u8ffd\u3044\u51fa\u3055\u308c\u305f Pod \u306f Kubernetes \u306e Auto healing \u6a5f\u80fd\u306b\u3088\u3063\u3066\u3001\u4ee3\u308f\u308a\u3068\u306a\u308b Pod \u304c\u5225\u30ce\u30fc\u30c9\u3067\u65b0\u3057\u304f\u7acb\u3061\u4e0a\u304c\u308a\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u307e\u305f Drain \u306b\u3088\u3063\u3066 Pod \u304c\u8ffd\u3044\u51fa\u3055\u308c\u308b\u3068\u304d\u3001Pod Disruption Budgets (PDB) \u306e\u7bc4\u56f2\u5185\u3067\u884c\u308f\u308c\u308b\u306e\u3067\u3001\u5b89\u5168\u306b\u8ffd\u3044\u51fa\u3057\u3067\u304d\u308b\u307e\u3067\u5f85\u3063\u3066\u304f\u308c\u308b\u3053\u3068\u3082\u671f\u5f85\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u672c\u30d7\u30ed\u30c0\u30af\u30c8\u3067\u306f\u3001\u3053\u306e Drain \u51e6\u7406\u306e\u305f\u3081\u306b\u6b21\u306e Lambda \u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">\u30ea\u30f3\u30af: <a href=\"https:\/\/github.com\/aws-samples\/amazon-k8s-node-drainer\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/aws-samples\/amazon-k8s-node-drainer<\/a><\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">(\u5f8c\u8ff0\u306e\u30ed\u30b0\u56de\u53ce\u78ba\u8a8d\u306e\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u30d5\u30c3\u30af\u3068\u4e26\u884c\u5229\u7528\u3059\u308b\u305f\u3081\u3001\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u3092\u9577\u304f\u3057\u3066\u4f7f\u3063\u3066\u3044\u307e\u3059)<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Managed Node Groups \u306b\u306f\u3053\u306e Drain \u6a5f\u80fd\u304c\u4e00\u7dd2\u306b\u4ed8\u3044\u3066\u304f\u308b\u3088\u3046\u3067\u3059\u306e\u3067\u3001\u4eca\u3067\u3042\u308c\u3070 PDB \u3060\u3051\u9069\u5207\u306b\u8a2d\u5b9a\u3057\u3066\u304a\u304d\u3001Drain \u306f Managed Node Groups \u306e\u6a5f\u80fd\u306b\u4efb\u305b\u308b\u306e\u304c\u826f\u3055\u305d\u3046\u3067\u3059\u3002<\/span><\/p>\n<h3 id=\"anker522\"><b>\u30ed\u30b0\u56de\u53ce\u306e\u78ba\u8a8d<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Web \u30b5\u30fc\u30d0\u306e\u30a2\u30af\u30bb\u30b9\u30ed\u30b0\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30a8\u30e9\u30fc\u30ed\u30b0\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u5206\u6790\u7528\u30ed\u30b0\u306a\u3069\u591a\u304f\u306e\u30ed\u30b0\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u4eca\u56de\u306f\u3053\u308c\u3089\u306e\u30ed\u30b0\u3092\u4f55\u3089\u304b\u306e\u30ed\u30b0\u53ce\u96c6\u57fa\u76e4\u306b\u8ee2\u9001\u30fb\u96c6\u7d04\u3059\u308b\u3053\u3068\u3092\u8003\u3048\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">EKS \u3067\u306f CloudWatch Container Insights \u3092\u5165\u308c\u308b\u3068\u3001CloudWatch Logs \u306b\u5404\u30b3\u30f3\u30c6\u30ca\u306e\u6a19\u6e96\u51fa\u529b\u3068\u6a19\u6e96\u30a8\u30e9\u30fc\u51fa\u529b\u304c\u8ee2\u9001\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u672c\u30d7\u30ed\u30c0\u30af\u30c8\u3067\u306f\u72ec\u81ea\u8a2d\u5b9a\u306e Fluentd DaemonSet \u3092\u914d\u7f6e\u3057\u3001\u5404\u30b3\u30f3\u30c6\u30ca\u306e\u6a19\u6e96\u51fa\u529b\u3068\u6a19\u6e96\u30a8\u30e9\u30fc\u51fa\u529b\u3092\u305d\u306e\u5185\u5bb9\u306b\u3088\u3063\u3066\u3001CloudWatch Logs \u3084 Amazon Kinesis \u306a\u3069\u306b\u632f\u308a\u5206\u3051\u3066\u8ee2\u9001\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">Fluentd \u306b\u306f buffer \u304c\u3042\u308a\u672a\u8ee2\u9001\u306e\u30ed\u30b0\u304c\u6b8b\u3063\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u306e\u3067\u3001\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306e\u7d42\u4e86\u6642\u306f ASG \u306e\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u30d5\u30c3\u30af\u3067 Fluentd buffer \u304c\u634c\u3051\u308b\u306e\u3092\u5f85\u3064\u51e6\u7406\u3092\u631f\u3080\u3053\u3068\u3067\u3001\u672a\u8ee2\u9001\u306e\u30ed\u30b0\u304c\u6b20\u640d\u3059\u308b\u3053\u3068\u3092\u306a\u308b\u3079\u304f\u907f\u3051\u308b\u3088\u3046\u306a\u5de5\u592b\u3092\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<h2 id=\"anker53\"><span style=\"font-weight: 400;\">\u30aa\u30fc\u30c8\u30b9\u30b1\u30fc\u30eb\u306f\u3069\u3046\u3059\u308b\u304b\uff1f<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">\u672c\u30d7\u30ed\u30c0\u30af\u30c8\u3067\u306f\u3001\u57fa\u672c\u7684\u306a\u6226\u7565\u3068\u3057\u3066\u306f Pod \u306e\u30aa\u30fc\u30c8\u30b9\u30b1\u30fc\u30eb\u306f Kubernetes \u306e Horizontal Pod Autoscaler (HPA) \u30ea\u30bd\u30fc\u30b9\u3067\u3001\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306e\u30aa\u30fc\u30c8\u30b9\u30b1\u30fc\u30eb\u306f Cluster Autoscaler \u3067\u3084\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">Cluster Autoscaler \u306f\u3001\u65b0\u3057\u304f\u4f5c\u6210\u3055\u308c\u305f Pod \u304c\u3069\u306e\u30ce\u30fc\u30c9\u306b\u3082\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3067\u304d\u306a\u3044 Pending \u72b6\u614b\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u691c\u77e5\u3059\u308b\u3068\u3001\u5fc5\u8981\u306a\u6570\u306e\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u304c\u5897\u3048\u308b\u3088\u3046\u306b Auto Scaling \u30b0\u30eb\u30fc\u30d7(ASG)\u306e Desired Capacity (\u5e0c\u671b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u6570) \u3092\u5897\u3084\u3057\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u305d\u3046\u3059\u308b\u3053\u3068\u3067 EC2 \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u7acb\u3061\u4e0a\u304c\u308a\u3001Kubernetes \u306e\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9 \u3068\u3057\u3066\u767b\u9332\u3055\u308c\u3066\u3001Pending \u72b6\u614b\u3060\u3063\u305f Pod \u304c\u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u3053\u306e\u30b9\u30b1\u30fc\u30eb\u30a2\u30a6\u30c8\u30d7\u30ed\u30bb\u30b9\u3067\u306f Pod \u304c Pending \u72b6\u614b\u306b\u306a\u3063\u3066\u304b\u3089\u521d\u3081\u3066 EC2 \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u7acb\u3061\u4e0a\u304c\u308b\u305f\u3081\u3001\u30b9\u30b1\u30fc\u30eb\u30a2\u30a6\u30c8\u306b\u6570\u5206\u7a0b\u5ea6\u306e\u6642\u9593\u3092\u8981\u3057\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u30b9\u30de\u30db\u30b2\u30fc\u30e0\u306e\u3088\u3046\u306b\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u306b\u6cbf\u3063\u3066\u904b\u55b6\u3055\u308c\u3066\u3044\u308b\u30b5\u30fc\u30d3\u30b9\u3067\u306f\u3001\u6025\u6fc0\u306b\u8ca0\u8377\u304c\u4e0a\u304c\u308b\u3053\u3068\u304c\u4e88\u6e2c\u3055\u308c\u308b\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u306f\u4e8b\u524d\u306b EC2 \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u7acb\u3061\u4e0a\u3052\u3066\u304a\u304d\u305f\u3044\u3068\u3044\u3046\u30b1\u30fc\u30b9\u3082\u3042\u308a\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u305d\u306e\u3088\u3046\u306a\u30b1\u30fc\u30b9\u306b\u304a\u3044\u3066\u306f\u3001ASG \u306b\u306f Scheduled Action \u3068\u3044\u3046\u6a5f\u80fd\u304c\u3042\u308b\u306e\u3067\u3001\u3042\u3089\u304b\u3058\u3081\u6c7a\u307e\u3063\u305f\u6642\u9593\u5e2f\u3060\u3051\u6700\u4f4e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u6570(Min)\u3001 \u5e0c\u671b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u6570(Descired Capacity) \u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">Scheduled Action \u306b\u3088\u3063\u3066\u5909\u66f4\u3055\u308c\u305f Min \u3084 Descired Capacity \u306e\u5024\u3092\u3069\u306e\u3088\u3046\u306b Cluster Autoscaler \u306b\u4f1d\u3048\u308b\u304b\u3068\u3044\u3046\u554f\u984c\u3082\u3042\u308a\u307e\u3059\u304c\u3001Cluster Autoscaler \u306b\u306f ASG \u306e Auto Discovery \u3068\u3044\u3046\u4fbf\u5229\u306a\u6a5f\u80fd\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">Discovery \u7528\u306e\u30bf\u30b0\u3092 ASG \u306b\u8a2d\u5b9a\u3057\u3066\u304a\u3051\u3070\u81ea\u52d5\u3067 ASG \u306e Min\u3001Descired Capacity \u304c\u5909\u308f\u3063\u305f\u3053\u3068\u3092 Cluster AutoScaler \u304c\u691c\u77e5\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u307e\u305f\u3001Cluster Autoscaler \u306f\u30ce\u30fc\u30c9\u306e CPU \u3084\u30e1\u30e2\u30ea\u306e\u4e88\u7d04(Request)\u7387\u304c\u4f4e\u3044\u72b6\u614b\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u306710\u5206\u9593\u7d9a\u304f\u3068\u3001\u305d\u306e\u30ce\u30fc\u30c9\u3092\u524a\u9664\u3059\u308b\u30b9\u30b1\u30fc\u30eb\u30a4\u30f3\u6a5f\u80fd\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">Scheduled Action \u3067\u5897\u3084\u3057\u305f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c 10\u5206\u5f8c\u306b\u524a\u9664\u3055\u308c\u3066\u56f0\u308b\u3068\u3044\u3046\u5834\u5408\u306f\u3001--scale-down-unneeded-time \u3092\u5ef6\u3070\u3057\u3066\u304a\u304f\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u672c\u30d7\u30ed\u30c0\u30af\u30c8\u3067\u306f\u3001--scale-down-unneeded-time=30m \u306b\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u5404 Pod \u306e Resource Request\/Limit \u3092\u3069\u3046\u8a2d\u5b9a\u3059\u308b\u304b\u3001\u3069\u306e EC2 \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u30bf\u30a4\u30d7\u3092\u4f7f\u3046\u304b\u3068\u3044\u3063\u305f\u90e8\u5206\u306f\u73fe\u72b6\u624b\u63a2\u308a\u3067\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u57fa\u672c\u7684\u306b\u306f Pod \u6570 \u3084 EC2 \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u6570\u306f\u7a81\u7136\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u969c\u5bb3\u306a\u3069\u3092\u8003\u616e\u3057\u3066\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u6570\u3092\u4e26\u3079\u3064\u3064\u3001\u4e00\u65b9\u3067 Pod \u6570\u3084 EC2 \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u5897\u3048\u3059\u304e\u308b\u3068 AWS API \u30b3\u30fc\u30eb\u6570\u304c\u5897\u3048\u3059\u304e\u308b\u306e\u3067\u3001\u30b9\u30da\u30c3\u30af\u30a2\u30c3\u30d7\u3057\u3066\u6570\u3092\u6291\u3048\u308b\u3068\u3044\u3063\u305f\u5bfe\u5fdc\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<h2 id=\"anker54\"><span style=\"font-weight: 400;\">\u30d0\u30c3\u30c1\u51e6\u7406\u3092\u3069\u3046\u9694\u96e2\u3059\u308b\u304b\uff1f<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">\u30b9\u30de\u30db\u30b2\u30fc\u30e0\u306b\u9650\u3089\u305a\u3001\u5b9a\u5e38\u7684\u306a\u904b\u7528\u3092\u56de\u3059\u305f\u3081\u306b\u81ea\u52d5\u5316\u3055\u308c\u305f\u51e6\u7406(\u30b8\u30e7\u30d6)\u3092\u5b9a\u671f\u5b9f\u884c\u3057\u305f\u3044\u3068\u3044\u3046\u30b1\u30fc\u30b9\u304c\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u4f8b\u3048\u3070\u3001\u30b7\u30b9\u30c6\u30e0\u904b\u7528\u306e\u6587\u8108\u3067\u306f\u4e0d\u8981\u30c7\u30fc\u30bf\u306e\u524a\u9664\u3084\u30d1\u30c3\u30c1\u306e\u9069\u7528\u3001Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u904b\u55b6\u3068\u3044\u3046\u6587\u8108\u3067\u306f\u30e6\u30fc\u30b6\u30fc\u30a2\u30af\u30c6\u30a3\u30d3\u30c6\u30a3\u306e\u96c6\u8a08\u51e6\u7406\u3001\u30b9\u30de\u30db\u30b2\u30fc\u30e0\u306e\u904b\u55b6\u3068\u3044\u3046\u6587\u8108\u3067\u306f\u30e9\u30f3\u30ad\u30f3\u30b0\u7d50\u679c\u306b\u5fdc\u3058\u305f\u5831\u916c\u306e\u4ed8\u4e0e\u51e6\u7406\u306a\u3069\u3067\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u3053\u3046\u3044\u3063\u305f\u30d0\u30c3\u30c1\u51e6\u7406\u3092\u884c\u3046 Pod (\u4ee5\u4e0b\u30d0\u30c3\u30c1)\u306f\u3001\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306e\u505c\u6b62\u306b\u3088\u308b\u4e2d\u65ad\u3092\u6975\u529b\u907f\u3051\u305f\u3044\u3068\u3044\u3046\u8981\u4ef6\u3082\u3042\u308a\u307e\u3057\u305f\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u4e00\u65b9\u3067 Auto Scaling \u30b0\u30eb\u30fc\u30d7 (ASG) \u7ba1\u7406\u4e0b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306f\u6c17\u8efd\u306b\u5165\u308c\u66ff\u3048\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306e\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u306e\u3057\u3084\u3059\u3055\u3092\u7dad\u6301\u3057\u305f\u3044\u3068\u3044\u3046\u8981\u4ef6\u3082\u3042\u308b\u305f\u3081\u3001\u30d0\u30c3\u30c1\u306f\u5c02\u7528\u306e\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306b\u9694\u96e2\u3057\u3001\u901a\u5e38\u306e\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u7528\u306e ASG \u3068\u306f\u5225\u306b\u30d0\u30c3\u30c1\u7528\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306e ASG \u3092\u7528\u610f\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u5c02\u7528\u306e\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u3092\u78ba\u4fdd\u3059\u308b\u3068\u3057\u3066\u3001\u305d\u306e\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306b\u30d0\u30c3\u30c1\u4ee5\u5916\u306e Pod \u3092\u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u3055\u305b\u306a\u3044\u3088\u3046\u306b\u3059\u308b(Taints)\u5bfe\u5fdc\u3068\u30d0\u30c3\u30c1 Pod \u306e\u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u6642\u306b\u3001\u5c02\u7528\u306e\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306e Taints \u3092\u8a31\u5bb9\u3059\u308b(Tolerations)\u3068\u5171\u306b\u3001\u5c02\u7528\u306e\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306b\u512a\u5148\u914d\u7f6e\u3059\u308b(Affinity)\u3068\u3044\u3063\u305f\u5bfe\u5fdc\u304c\u5fc5\u8981\u3067\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u307e\u305a\u3001\u30d0\u30c3\u30c1\u7528\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306e\u30e6\u30fc\u30b6\u30fc\u30c7\u30fc\u30bf(\u8d77\u52d5\u6642\u306e\u5b9f\u884c\u30b9\u30af\u30ea\u30d7\u30c8)\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b Kubernetes \u30ce\u30fc\u30c9\u306b\u4ed8\u3051\u308b Labels \u3068 Taints \u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<pre><code>\/etc\/eks\/bootstrap.sh ${ClusterName} ${BootstrapArguments} \\\n                --kubelet-extra-args '--node-labels=node.kubernetes.io\/extra-node=batch --register-with-taints=app=batch:NoSchedule'<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">\u3053\u306e\u30e6\u30fc\u30b6\u30fc\u30c7\u30fc\u30bf\u3067\u8d77\u52d5\u3057\u3066\u304d\u305f\u30ce\u30fc\u30c9\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b Labels \u3068 Taints \u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<pre><code>$ kubectl describe node ip-10-110-192-151.ap-northeast-1.compute.internal | grep -e Taints -e node.ku -e Label\nLabels:             beta.kubernetes.io\/arch=amd64\n                    node.kubernetes.io\/extra-node=batch\nTaints:             app=batch:NoSchedule<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">Effect(\u53f3\u7aef)=NoSchedule \u306a\u306e\u3067\u3001\u3053\u306e Taints \u3092\u8a31\u5bb9\u3067\u304d\u308b Pod \u4ee5\u5916\u306f\u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u3055\u308c\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u30c7\u30d5\u30a9\u30eb\u30c8\u3060\u3068 DaemonSet \u3082\u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u3055\u308c\u306a\u304f\u306a\u308b\u306e\u3067\u3001Taints \u3092\u8a2d\u5b9a\u3057\u305f\u30ce\u30fc\u30c9\u306b\u3082 DaemonSet \u306e Pod \u3092\u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u3055\u305b\u308b\u306b\u306f DaemonSet \u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a Tolerations \u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/span><\/p>\n<pre><code>tolerations:\n  - operator: \"Exists\"<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">\u305d\u3057\u3066\u3001\u30d0\u30c3\u30c1\u51e6\u7406\u3092\u884c\u3046 Pod \u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a Tolerations \u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u660e\u793a\u3057\u305f Taints \u3092\u8a31\u5bb9\u3057\u3066\u3001\u5c02\u7528\u306e\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u304c\u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u5019\u88dc\u306b\u542b\u307e\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/span><\/p>\n<pre><code>tolerations:\n  - key: \"app\"\n    value: \"batch\"\n    effect: \"NoSchedule\"<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">\u3057\u304b\u3057\u3053\u308c\u3060\u3051\u3060\u3068\u3001\u6570\u3042\u308b\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306e1\u3064\u3068\u3057\u3066\u3001\u5c02\u7528\u306e\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u3092\u9078\u629e\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3060\u3051\u3067\u3001\u5b9f\u969b\u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u308b\u30ce\u30fc\u30c9\u306f\u5225\u306e\u30ce\u30fc\u30c9\u306b\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u305d\u306e\u305f\u3081\u3001\u30d0\u30c3\u30c1\u51e6\u7406\u3092\u884c\u3046 Pod \u306b Affinity \u3092\u5408\u308f\u305b\u3066\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u5c02\u7528\u306e\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306b\u512a\u5148\u3057\u3066\u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u5148\u306b\u5c02\u7528\u306e\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306e\u30e6\u30fc\u30b6\u30c7\u30fc\u30bf\u3067\u8b58\u5225\u7528\u306e Labels \u3092\u4ed8\u3051\u3066\u304a\u3044\u305f\u306e\u3067\u3001\u305d\u308c\u3092\u4f7f\u3063\u3066 Affinity \u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u4ee5\u4e0b\u306e\u4f8b\u3067\u306f\u3001\u3067\u304d\u308b\u3060\u3051\u5c02\u7528\u306e\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306b\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3057\u3001\u5c02\u7528\u306e\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306b\u30ea\u30bd\u30fc\u30b9\u306e\u7a7a\u304d\u304c\u306a\u3044\u5834\u5408\u306f\u4ed6\u306e\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u3067\u5b9f\u884c\u3059\u308b\u8a2d\u5b9a\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<pre><code>affinity:\n  nodeAffinity:\n    preferredDuringSchedulingIgnoredDuringExecution:\n    - weight: 100\n      preference:\n        matchExpressions:\n        - key: node.kubernetes.io\/extra-node\n          operator: In\n          values:\n          - batch<\/code><\/pre>\n<p>&nbsp;<\/p>\n<h2 id=\"anker55\"><span style=\"font-weight: 400;\">Kubernetes (EKS) \u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u306f\u3069\u3046\u3057\u3066\u3044\u304f\u304b\uff1f<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">AWS\u516c\u5f0f\u304b\u3089\u30a2\u30ca\u30a6\u30f3\u30b9\u3055\u308c\u3066\u3044\u308b\u901a\u308a\u3001\u7d0490\u65e5\u304a\u304d\u306b\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u308b Kubernetes \u306b\u8ffd\u5f93\u3059\u308b\u305f\u3081\u3001EKS \u3067\u306f\u5c11\u306a\u304f\u3068\u30823\u3064\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">\u30ea\u30f3\u30af: <\/span><a href=\"https:\/\/aws.amazon.com\/jp\/blogs\/news\/updates-to-amazon-eks-version-lifecycle\/\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">https:\/\/aws.amazon.com\/jp\/blogs\/news\/updates-to-amazon-eks-version-lifecycle\/<\/span><\/a><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u305d\u306e\u5f53\u6642\u306e\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u3067 EKS \u30af\u30e9\u30b9\u30bf\u3092\u4f5c\u6210\u3057\u305f\u3068\u3057\u3066\u3082\u7d04180\u65e5\u304b\u3089\u7d04270\u65e5\u7a0b\u5ea6\u7d4c\u3066\u3070\u305d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u5ec3\u6b62\u3068\u306a\u308b\u306e\u3067\u3001\u5b9a\u671f\u7684\u306b\u65b0\u3057\u3044 Kubernetes \u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3059\u308b\u904b\u7528\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">EKS \u30af\u30e9\u30b9\u30bf\u3092\u30a4\u30f3\u30d7\u30ec\u30fc\u30b9\u3067\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3059\u308b\u624b\u9806\u306f\u3001\u516c\u5f0f\u30de\u30cb\u30e5\u30a2\u30eb\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">\u30ea\u30f3\u30af: <\/span><a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/eks\/latest\/userguide\/update-cluster.html\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">https:\/\/docs.aws.amazon.com\/ja_jp\/eks\/latest\/userguide\/update-cluster.html<\/span><\/a><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u624b\u9806\u3092\u898b\u3066\u307f\u308b\u3068\u3001Kubernetes \u30d0\u30fc\u30b8\u30e7\u30f3\u3054\u3068\u306b EKS \u306b\u3088\u308a\u7ba1\u7406\u3055\u308c\u3066\u3044\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8(Amazon VPC CNI \u30d7\u30e9\u30b0\u30a4\u30f3\u3001CoreDNS, kube-proxy\u306a\u3069)\u306b\u3064\u3044\u3066\u306f\u3001\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u6c7a\u307e\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u3057\u304b\u3057\u3001\u81ea\u5206\u305f\u3061\u3067\u5165\u308c\u305f EKS \u7ba1\u7406\u5916\u306e\u30a2\u30c9\u30aa\u30f3(ClusterAutoscaler \u3084 AWS ALB Ingress Controller \u306a\u3069)\u3082\u305d\u308c\u81ea\u4f53\u65b0\u3057\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u51fa\u7d9a\u3051\u308b\u3082\u306e\u3067\u3042\u308a\u3001\u65b0\u3057\u3044 Kubernetes \u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u305d\u308c\u3089\u306e\u30a2\u30c9\u30aa\u30f3\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u4e92\u63db\u6027\u3082\u6c17\u306b\u306a\u308b\u3068\u3053\u308d\u3067\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u4f8b\u3048\u3070\u3001Cluster Autoscaler \u306f Kubernetes \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u5408\u308f\u305b\u3066\u3001ClusterAutoscaler \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3082\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3059\u308b\u306e\u304c\u63a8\u5968\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">\u30ea\u30f3\u30af: <\/span><a href=\"https:\/\/github.com\/kubernetes\/autoscaler\/tree\/master\/cluster-autoscaler#releases\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">https:\/\/github.com\/kubernetes\/autoscaler\/tree\/master\/cluster-autoscaler#releases<\/span><\/a><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u3069\u306e\u307f\u3061\u516c\u5f0f\u624b\u9806\u3067\u3082\u672c\u756a\u74b0\u5883\u306e\u30af\u30e9\u30b9\u30bf\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3059\u308b\u524d\u306b\u65b0\u3057\u3044 Kubernetes \u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u81ea\u5206\u305f\u3061\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u52d5\u304f\u304b\u306f\u4e8b\u524d\u306e\u691c\u8a3c\u304c\u5fc5\u8981\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3057\u3001\u904b\u7528\u4e2d\u306e\u30af\u30e9\u30b9\u30bf\u3092\u30a4\u30f3\u30d7\u30ec\u30fc\u30b9\u3067\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3059\u308b\u306e\u306f\u4eca\u306f\u307e\u3060\u907f\u3051\u305f\u65b9\u304c\u826f\u3044\u3068\u500b\u4eba\u7684\u306b\u601d\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u30a4\u30f3\u30d7\u30ec\u30fc\u30b9\u3067\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u306a\u3044\u5834\u5408\u3001\u65b0\u3057\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306e EKS \u30af\u30e9\u30b9\u30bf\u3092\u65b0\u3057\u304f\u4f5c\u3063\u3066\u3001\u30af\u30e9\u30b9\u30bf\u30ec\u30d9\u30eb\u3067\u306e Blue\/Green \u30c7\u30d7\u30ed\u30a4\u306e\u3088\u3046\u306b\u3057\u3066\u79fb\u884c\u3059\u308b\u65b9\u6cd5\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u4eca\u56de\u306e\u30d7\u30ed\u30c0\u30af\u30c8\u3067\u306f\u65b0\u3057\u3044\u30af\u30e9\u30b9\u30bf\u3068\u30ce\u30fc\u30c9\u30b0\u30eb\u30fc\u30d7\u306a\u3069\u3092 CloudFormation \u4e00\u767a\u3067\u7acb\u3066\u3089\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u81ea\u5206\u305f\u3061\u3067\u5165\u308c\u308b\u5404\u30a2\u30c9\u30aa\u30f3\u306f\u305d\u308c\u305e\u308c\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u9078\u5b9a\u3092\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5f62\u306b\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u30af\u30e9\u30b9\u30bf\u3054\u3068\u79fb\u884c\u3059\u308b\u65b9\u6cd5\u306e\u30e1\u30ea\u30c3\u30c8\u3068\u3057\u3066\u3001\u30b5\u30fc\u30d3\u30b9\u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u79fb\u884c\u3059\u308b\u524d\u306b\u3001\u81ea\u5206\u305f\u3061\u3067\u5165\u308c\u305f\u30a2\u30c9\u30aa\u30f3\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u691c\u8a3c\u3084\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u52d5\u4f5c\u78ba\u8a8d\u306a\u3069\u3092\u3086\u3063\u304f\u308a\u884c\u3048\u308b\u3068\u3044\u3046\u70b9\u304c\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u306a\u304a\u30af\u30e9\u30b9\u30bf\u3092\u8907\u6570\u7acb\u3066\u308b\u5834\u5408\u306f\u3001\u8907\u6570\u306e EKS \u30af\u30e9\u30b9\u30bf\u304b\u3089\u540c\u3058 AWS \u30ea\u30bd\u30fc\u30b9(Auto Scaling \u30b0\u30eb\u30fc\u30d7\u3084 ALB \u306a\u3069)\u3092\u64cd\u4f5c\u3057\u306a\u3044\u3088\u3046\u306b\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u4eca\u56de\u306e\u69cb\u6210\u3067\u306f AWS \u30ea\u30bd\u30fc\u30b9\u306e\u7ba1\u7406\u3092\u884c\u3046\u30a2\u30c9\u30aa\u30f3\u306f AWS ALB Ingress Controller \u3068 ClusterAutoscaler \u306e\u307f\u3060\u3063\u305f\u306e\u3067\u3001\u3053\u308c\u3089\u306b\u3064\u3044\u3066\u3069\u306e\u3088\u3046\u306a\u3053\u3068\u306b\u6ce8\u610f\u3059\u308c\u3070\u826f\u3044\u304b\u3001\u305d\u308c\u305e\u308c\u898b\u3066\u3044\u304d\u307e\u3059\u3002<\/span><\/p>\n<h3><b>AWS ALB Ingress Controller<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">AWS ALB Ingress Controller \u304c\u4f5c\u308b ALB \u540d\u306f\u3069\u306e\u3088\u3046\u306b\u6c7a\u5b9a\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3057\u3087\u3046\u304b\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u898b\u308b\u3068\u3001ALBNamePrefix, namespace, ingressName \u306b\u3088\u3063\u3066\u4e00\u610f\u306b\u5b9a\u307e\u308b\u3088\u3046\u3067\u3059\u3002<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">\u30ea\u30f3\u30af: <\/span><a href=\"https:\/\/github.com\/kubernetes-sigs\/aws-alb-ingress-controller\/blob\/b42cd805796e46570d336e9b2c3530be61c5c620\/internal\/alb\/generator\/name.go#L23-L39\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">https:\/\/github.com\/kubernetes-sigs\/aws-alb-ingress-controller\/blob\/b42cd805796e46570d336e9b2c3530be61c5c620\/internal\/alb\/generator\/name.go#L23-L39<\/span><\/a><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">ALBNamePrefix \u304c\u30af\u30e9\u30b9\u30bf\u3054\u3068\u306b\u30e6\u30cb\u30fc\u30af\u306a\u5024\u3067\u3042\u308c\u3070\u3001\u30af\u30e9\u30b9\u30bf\u3054\u3068\u306b\u7570\u306a\u308b ALB \u304c\u51fa\u6765\u4e0a\u304c\u308b\u306e\u3067\u7af6\u5408\u3092\u907f\u3051\u3089\u308c\u305d\u3046\u3067\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">ALBNamePrefix \u306f <code>--alb-name-prefix<\/code> \u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u3053\u3068\u3067\u3001\u305d\u306e\u540d\u306e\u901a\u308a ALB \u540d\u306e\u00a0 Prefix \u3068\u306a\u308b\u306e\u3067\u306a\u308b\u3079\u304f\u77ed\u3044\u5024\u3092\u4ed8\u3051\u308b\u306e\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u30af\u30e9\u30b9\u30bf\u3054\u3068\u306b ALB \u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u65b0\u3057\u3044\u30af\u30e9\u30b9\u30bf\u3078\u79fb\u884c\u3059\u308b\u969b\u306f\u30c9\u30e1\u30a4\u30f3\u306e CNAME \u5148\u3092\u65b0\u3057\u304f\u4f5c\u3089\u308c\u305f ALB \u306b\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u3053\u306e\u624b\u6cd5\u3060\u3068\u30af\u30e9\u30b9\u30bf\u79fb\u884c\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067 DNS\u30ec\u30d9\u30eb\u306e\u5909\u66f4\u304c\u5fc5\u8981\u306b\u306a\u308b\u306e\u3067\u3001\u305d\u308c\u3092\u907f\u3051\u305f\u3044\u5834\u5408\u306f AWS ALB Ingress Controller \u3092\u4f7f\u308f\u306a\u3044\u3068\u3044\u3046\u9078\u629e\u80a2\u3082\u691c\u8a0e\u3059\u308b\u306e\u304c\u826f\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u3061\u306a\u307f\u306b\u3001\u8907\u6570\u306e\u30af\u30e9\u30b9\u30bf(\u306e AWS ALB Ingress Controller)\u304b\u3089\u5358\u4e00\u306e ALB \u3092\u7ba1\u7406\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u306a\u305c\u306a\u3089\u30af\u30e9\u30b9\u30bf\u3054\u3068\u306b ALB \u306e\u30bf\u30fc\u30b2\u30c3\u30c8(\u3068\u3057\u3066\u767b\u9332\u3059\u308b NodePort \u3084 Pod \u306e IP\u30a2\u30c9\u30ec\u30b9)\u304c\u7570\u306a\u308b\u306e\u3067\u3001\u5404\u30af\u30e9\u30b9\u30bf\u306e AWS ALB Ingress Controller \u304c\u6c38\u9060\u3068\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u8ffd\u52a0\u3068\u524a\u9664\u3092\u7e70\u308a\u8fd4\u3059\u304b\u3089\u3067\u3059\u3002<\/span><\/p>\n<h3><b>ClusterAutoscaler<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">\u65b0\u3057\u3044\u30af\u30e9\u30b9\u30bf\u3092\u7acb\u3066\u308b\u969b\u306b\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306e Auto Scaling \u30b0\u30eb\u30fc\u30d7\u3082\u65b0\u3057\u3044\u3082\u306e\u304c\u4f5c\u3089\u308c\u308b\u306e\u3067\u3001ClusterAutoscaler \u3092\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u969b\u306b\u65b0\u3057\u3044 ASG \u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">ASG \u3092\u9759\u7684\u306b\u6307\u5b9a\u3057\u3066\u3044\u308b\u5834\u5408\u306f ASG \u306e ARN \u3092\u3001ASG \u306e Auto Discovery \u6a5f\u80fd\u3092\u4f7f\u3063\u3066\u3044\u308b\u5834\u5408\u306f ASG \u306e\u30bf\u30b0(\u30af\u30e9\u30b9\u30bf\u8b58\u5225\u7528)\u3092\u5909\u66f4\u3057\u307e\u3059\u3002<\/span><\/p>\n<h3><b>ExternalDns<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">\u4eca\u56de\u306e\u69cb\u6210\u306b\u306f\u5165\u3063\u3066\u3044\u307e\u305b\u3093\u304c\u3001AWS ALB Ingress Controller \u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u3046\u3068 ALB \u306e\u8a2d\u5b9a\u304b\u3089 Route 53 \u3078\u306e\u30ec\u30b3\u30fc\u30c9\u767b\u9332\u307e\u3067\u3084\u3063\u3066\u304f\u308c\u308b\u975e\u5e38\u306b\u4fbf\u5229\u306a\u30a2\u30c9\u30aa\u30f3\u3067\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u30af\u30e9\u30b9\u30bf\u79fb\u884c\u306e\u969b\u306f AWS ALB Ingress Controller \u306b\u3088\u308a\u65b0\u3057\u3044 ALB \u304c\u4f5c\u3089\u308c\u308b\u306e\u3067\u30c9\u30e1\u30a4\u30f3\u306e\u5411\u304d\u5148\u3092\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c\u3001ExternalDns \u3092\u5165\u308c\u305f\u72b6\u614b\u3067\u305d\u308c\u3092\u7ba1\u7406\u3059\u308b\u306e\u306f\u8907\u96d1\u306b\u306a\u308b\u305f\u3081\u3001\u672c\u756a\u74b0\u5883\u3067\u306f ExternalDns \u306f\u4f7f\u308f\u306a\u3044\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">(\u958b\u767a\u74b0\u5883\u7528\u306e\u30af\u30e9\u30b9\u30bf\u306b\u306f\u5165\u308c\u3066\u3042\u308a\u91cd\u5b9d\u3057\u3066\u3044\u307e\u3059)<\/span><\/p>\n<h1 id=\"anker6\"><span style=\"font-weight: 400;\">\u8ca0\u8377\u8a66\u9a13\u4e2d\u3084\u904b\u7528\u958b\u59cb\u5f8c\u306b\u767a\u751f\u3057\u305f\u554f\u984c<\/span><\/h1>\n<h2 id=\"anker61\"><span style=\"font-weight: 400;\">DNS \u306e\u540d\u524d\u89e3\u6c7a\u306b\u5931\u6557\u3059\u308b<\/span><\/h2>\n<h3 id=\"anker611\"><span style=\"font-weight: 400;\">PHP + Apache \u7279\u6709\u306e\u4e8b\u60c5<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">PHP + Apache(mod_php) \u306f\u3001<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">\u5404 HTTP(S) \u30ea\u30af\u30a8\u30b9\u30c8\u3054\u3068\u306b\u5fc5\u8981\u306a\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u30b5\u30fc\u30d0(MySQL, Redis, Memcached \u306a\u3069)\u3068\u901a\u4fe1\u3092\u884c\u3046\u969b\u306b\u3001\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u30d7\u30fc\u30ea\u30f3\u30b0\u3084\u6301\u7d9a\u7684\u63a5\u7d9a(pconnect) \u3092\u4f7f\u308f\u306a\u3051\u308c\u3070\u3001\u90fd\u5ea6\u63a5\u7d9a&amp;\u5207\u65ad\u3092\u884c\u3046<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">\u63a5\u7d9a\u3092\u884c\u3046\u969b\u3001\u63a5\u7d9a\u5148\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u304c\u540d\u524d\u306a\u3089\u3070\u3001\u305d\u308c\u3092\u540d\u524d\u89e3\u6c7a\u3059\u308b\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u7d50\u679c\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3057\u306a\u3044<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u306e\u305f\u3081\u3001\u540d\u524d\u89e3\u6c7a\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u5897\u3048\u3084\u3059\u3044\u3068\u3044\u3046\u4e8b\u60c5\u304c\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n<h3 id=\"anker612\"><span style=\"font-weight: 400;\">Kubernetes \u7279\u6709\u306e\u4e8b\u60c5<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Pod \u306e DNS \u30ea\u30be\u30eb\u30d0\u30fc\u8a2d\u5b9a(\/etc\/resolv.conf) \u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3060\u3068\u3001\u4f8b\u3068\u3057\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<pre><code>nameserver 172.20.0.10\nsearch default.svc.cluster.local svc.cluster.local cluster.local ap-northeast-1.compute.internal\noptions ndots:5<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">\u3053\u306e ndots \u3068\u3044\u3046\u306e\u306f\u3001\u540d\u524d\u89e3\u6c7a\u3057\u305f\u3044\u30c9\u30e1\u30a4\u30f3\u540d\u306b\u30c9\u30c3\u30c8\u304c X \u500b\u542b\u307e\u308c\u3066\u3044\u308b\u3068\u3059\u308b\u3068\u3001<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">X &lt;\u00a0 ndots \u306e\u3068\u304d\u306f\u3001\u5148\u306b search \u306b\u5217\u6319\u3057\u305f\u30c9\u30e1\u30a4\u30f3\u3067\u88dc\u5b8c\u3057\u3066\u3001\u30d2\u30c3\u30c8\u3059\u308b\u307e\u3067\u9806\u6b21\u540d\u524d\u89e3\u6c7a\u3057\u3066\u3044\u304f<\/span>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">hoge.example.com \u306e\u5834\u5408: hoge.example.com.default.svc.cluster.local -&gt; hoge.example.com.svc.cluster.local -&gt; \u2026 -&gt; hoge.example.com<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">X &gt;= ndots \u306e\u3068\u304d\u306f\u3001\u307e\u305a\u306f search \u3067\u88dc\u5b8c\u305b\u305a\u306b\u3001FQDN \u3068\u3057\u3066\u540d\u524d\u89e3\u6c7a\u3092\u8a66\u307f\u308b<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u3068\u3044\u3046\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\u3002<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">\u53c2\u8003: <\/span><a href=\"https:\/\/linuxjm.osdn.jp\/html\/LDP_man-pages\/man5\/resolv.conf.5.html\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">https:\/\/linuxjm.osdn.jp\/html\/LDP_man-pages\/man5\/resolv.conf.5.html<\/span><\/a><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">ndots (Linux \u30c7\u30d5\u30a9\u30eb\u30c8\u306f1)\u304c\u591a\u304f\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u306e\u306f\u3001Kubernetes \u5185\u3067\u306e\u30b5\u30fc\u30d3\u30b9\u30c7\u30a3\u30b9\u30ab\u30d0\u30ea\u306e\u5229\u4fbf\u6027\u3092\u8ffd\u6c42\u3059\u308b\u305f\u3081\u306e\u3088\u3046\u3067\u3059\u3002<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">\u53c2\u8003: <\/span><a href=\"https:\/\/github.com\/kubernetes\/kubernetes\/issues\/33554#issuecomment-266251056\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">https:\/\/github.com\/kubernetes\/kubernetes\/issues\/33554#issuecomment-266251056<\/span><\/a><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u4e00\u65b9\u3067\u3001Kubernetes \u5916\u306b\u3042\u308b\u30b5\u30fc\u30d3\u30b9\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u304c\u30c9\u30e1\u30a4\u30f3\u540d\u3067\u3001\u30c9\u30c3\u30c8\u6570\u304c5\u672a\u6e80\u3067\u3042\u308c\u3070\u3001\u5148\u306b search \u3067\u88dc\u5b8c\u3057\u3066\u540d\u524d\u89e3\u6c7a\u304c\u8a66\u3055\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u30d2\u30c3\u30c8\u3057\u306a\u3044\u540d\u524d\u89e3\u6c7a\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u610f\u56f3\u305b\u305a\u5897\u3048\u3066\u3057\u307e\u3046\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u307e\u305f\u305d\u308c\u3068\u306f\u5225\u306b\u3001Kubernetes \u30af\u30e9\u30b9\u30bf\u306b\u306f kube-dns \u3068\u3044\u3046 DNS \u30b5\u30fc\u30d3\u30b9\u304c\u3042\u308a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u5404 Pod \u304b\u3089\u306e\u540d\u524d\u89e3\u6c7a\u30ea\u30af\u30a8\u30b9\u30c8\u306f kube-dns \u306b\u98db\u3073\u307e\u3059\u304c\u3001kube-dns \u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3060\u3068 2 Pod \u56fa\u5b9a\u306e\u305f\u3081\u3001\u8ca0\u8377\u304c\u96c6\u4e2d\u3057\u3084\u3059\u3044\u69cb\u6210\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<h3 id=\"anker613\"><span style=\"font-weight: 400;\">AWS \u304c\u63d0\u4f9b\u3059\u308b VPC \u5185\u306e DNS \u30b5\u30fc\u30d0\u306e\u5236\u9650<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">RDS \u3084 ElastiCache \u306f\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u304c\u30c9\u30e1\u30a4\u30f3\u540d\u3067\u63d0\u4f9b\u3055\u308c\u308b\u306e\u3067\u3001\u3053\u308c\u3089 Kubernetes \u5916\u3067\u7ba1\u7406\u3055\u308c\u308b\u30c9\u30e1\u30a4\u30f3\u540d\u306f VPC \u5185\u306e DNS \u30b5\u30fc\u30d0\u306b\u30d5\u30a9\u30ef\u30fc\u30c9\u3055\u308c\u307e\u3059\u3002<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u3053\u306e DNS \u30b5\u30fc\u30d0\u306f 1 ENI \u3042\u305f\u308a 1024 \u30d1\u30b1\u30c3\u30c8\/\u79d2 \u306e<\/span><a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/vpc\/latest\/userguide\/vpc-dns.html#vpc-dns-limits\"><span style=\"font-weight: 400;\">\u5236\u9650<\/span><\/a><span style=\"font-weight: 400;\">\u304c\u3042\u308b\u306e\u3067\u3001\u3053\u3053\u3082\u5f15\u3063\u304b\u304b\u308a\u3084\u3059\u3044\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u3002<\/span><\/p>\n<h3 id=\"anker614\"><span style=\"font-weight: 400;\">\u56de\u907f\u65b9\u6cd5<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">\u3053\u308c\u3089\u306e\u554f\u984c\u306b\u5bfe\u3057\u3066\u672c\u30d7\u30ed\u30c0\u30af\u30c8\u3067\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066 DNS \u306e\u554f\u984c\u3092\u56de\u907f\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">\u63a5\u7d9a\u5148\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8(FQDN) \u306e\u6700\u5f8c\u306b\u30c9\u30c3\u30c8\u3092\u4ed8\u3051\u3066\u3001search \u306b\u3088\u308b\u88dc\u5b8c\u3092\u56de\u907f\u3059\u308b<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">ndots \u3092 1 \u306b\u3059\u308b<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 Pod \u306b\u30b5\u30a4\u30c9\u30ab\u30fc\u3068\u3057\u3066 DNS \u30ad\u30e3\u30c3\u30b7\u30e5\u30b5\u30fc\u30d0\u3092\u4ed8\u3051\u308b<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">\u30af\u30e9\u30b9\u30bf\u5185\u306e kube-dns \u306b\u30aa\u30fc\u30c8\u30b9\u30b1\u30fc\u30eb\u3092\u5c0e\u5165\u3059\u308b<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">kube-dns \u306e\u30aa\u30fc\u30c8\u30b9\u30b1\u30fc\u30eb\u3068\u3044\u3046\u306e\u306f\u3001cluster-proportional-autoscaler \u3092\u4f7f\u3046\u3053\u3068\u3067\u30ce\u30fc\u30c9\u6570\u3084\u30b3\u30a2\u6570\u306a\u3069\u306b\u5fdc\u3058\u3066 kube-dns \u30b5\u30fc\u30d3\u30b9 (CoreDNS \u306e Pod \u6570)\u3092\u30b9\u30b1\u30fc\u30eb\u3055\u305b\u308b\u3082\u306e\u3067\u3059\u3002\u8a73\u3057\u304f\u306f Kubernetes \u516c\u5f0f\u306e\u30de\u30cb\u30e5\u30a2\u30eb(\u82f1\u8a9e) \u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">\u30ea\u30f3\u30af: <\/span><a href=\"https:\/\/kubernetes.io\/docs\/tasks\/administer-cluster\/dns-horizontal-autoscaling\/\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">https:\/\/kubernetes.io\/docs\/tasks\/administer-cluster\/dns-horizontal-autoscaling\/<\/span><\/a><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">DNS \u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3068\u3044\u3046\u30bf\u30b9\u30af\u3092\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30bf\u30b9\u30af\u3068\u8003\u3048\u308b\u304b\u3001\u30a4\u30f3\u30d5\u30e9\u30ec\u30a4\u30e4\u306e\u30bf\u30b9\u30af\u3068\u8003\u3048\u308b\u304b\u3067\u3001\u30b5\u30a4\u30c9\u30ab\u30fc\u3068\u3057\u3066\u5165\u308c\u308b\u3079\u304d\u304b\u3069\u3046\u304b\u306f\u5909\u308f\u3063\u3066\u304f\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u30a4\u30f3\u30d5\u30e9\u30ec\u30a4\u30e4\u3067\u306e\u5bfe\u5fdc\u624b\u6cd5\u3068\u3057\u3066\u306f\u3082\u30461\u3064\u3001 NodeLocal DNSCache \u3068\u3044\u3046\u306e\u304c Kubernetes \u306e\u30a2\u30c9\u30aa\u30f3\u3068\u3057\u3066\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">NodeLocal DNSCache \u306f DaemonSet \u3068\u3057\u3066\u5404\u30ce\u30fc\u30c9\u306b DNS \u30ad\u30e3\u30c3\u30b7\u30e5\u30b5\u30fc\u30d0\u304c\u7acb\u3064\u3082\u306e\u3067\u30011.15 \u304b\u3089 HA \u6a5f\u80fd\u304c\u4ed8\u3044\u3066 beta \u306b\u6607\u683c\u3057\u307e\u3057\u305f\u3002<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">\u30ea\u30f3\u30af: <\/span><a href=\"https:\/\/github.com\/kubernetes\/kubernetes\/tree\/master\/cluster\/addons\/dns\/nodelocaldns\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">https:\/\/github.com\/kubernetes\/kubernetes\/tree\/master\/cluster\/addons\/dns\/nodelocaldns<\/span><\/a><\/li>\n<\/ul>\n<h2 id=\"anker62\"><span style=\"font-weight: 400;\">\u30ed\u30fc\u30ea\u30f3\u30b0\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u6642\u306b ELB 502 \u30a8\u30e9\u30fc\u304c\u591a\u767a\u3059\u308b<\/span><\/h2>\n<h3 id=\"anker621\"><b>Pod \u304c\u3059\u3050\u7d42\u4e86\u3057\u3066\u3057\u307e\u3063\u3066\u3001\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u304b\u3089\u524a\u9664\u3059\u308b\u51e6\u7406\u304c\u9593\u306b\u5408\u308f\u306a\u3044<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">\u307e\u305a\u524d\u63d0\u3068\u3057\u3066\u3001\u4eca\u56de\u306e\u69cb\u6210\u3067\u306f AWS ALB Ingress Controller \u3092\u4f7f\u3063\u3066 ALB \u306e\u30bf\u30fc\u30b2\u30c3\u30c8\u30b0\u30eb\u30fc\u30d7\u7ba1\u7406\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">AWS ALB Ingress Controller \u306b\u306f\u30012\u3064\u306e\u30bf\u30fc\u30b2\u30c3\u30c8\u30bf\u30a4\u30d7(Ingress \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u30e2\u30fc\u30c9) \u304c\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">instance \u30e2\u30fc\u30c9: ALB \u306e\u30bf\u30fc\u30b2\u30c3\u30c8\u30b0\u30eb\u30fc\u30d7\u306b\u306f\u3001\u5168\u3066\u306e\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306e IP \u30a2\u30c9\u30ec\u30b9\u3068 NodePort Service \u7528\u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u305f nodePort \u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u767b\u9332\u3055\u308c\u307e\u3059\u3002ALB \u3067\u53d7\u3051\u305f\u30ea\u30af\u30a8\u30b9\u30c8\u306f NodePort Service \u3092\u4ecb\u3057\u3066\u3001\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306b\u767b\u9332\u3055\u308c\u305f\u3044\u305a\u308c\u304b\u306e Pod \u306b\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3055\u308c\u307e\u3059\u3002<\/span><\/li>\n<\/ul>\n<p><a href=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/alb_type_instance.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-20487 \" src=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/alb_type_instance-485x400.png\" alt=\"\" width=\"485\" height=\"400\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/alb_type_instance-485x400.png 485w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/alb_type_instance-243x200.png 243w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/alb_type_instance.png 609w\" sizes=\"auto, (max-width: 485px) 100vw, 485px\" \/><\/a><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">ip \u30e2\u30fc\u30c9: ALB \u306e\u30bf\u30fc\u30b2\u30c3\u30c8\u30b0\u30eb\u30fc\u30d7\u306b\u306f Service \u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3068\u306a\u308b \u5404 Pod \u306e IP \u30a2\u30c9\u30ec\u30b9\u304c\u767b\u9332\u3055\u308c\u307e\u3059\u3002ALB \u3067\u53d7\u3051\u305f\u30ea\u30af\u30a8\u30b9\u30c8\u306f\u30bf\u30fc\u30b2\u30c3\u30c8\u30b0\u30eb\u30fc\u30d7\u306b\u767b\u9332\u3055\u308c\u305f\u3044\u305a\u308c\u304b\u306e Pod \u306b\u76f4\u63a5\u5230\u9054\u3057\u307e\u3059\u3002<\/span><\/li>\n<\/ul>\n<p><a href=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/alb_type_ip.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-20488 \" src=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/alb_type_ip-537x400.png\" alt=\"\" width=\"537\" height=\"400\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/alb_type_ip-537x400.png 537w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/alb_type_ip-268x200.png 268w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/alb_type_ip.png 609w\" sizes=\"auto, (max-width: 537px) 100vw, 537px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u4eca\u56de\u306e\u30d7\u30ed\u30c0\u30af\u30c8\u3067\u306f\u30bf\u30fc\u30b2\u30c3\u30c8\u30bf\u30a4\u30d7\u3092 ip\u30e2\u30fc\u30c9\u3067\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u898b\u51fa\u3057\u306e\u554f\u984c\u306b\u623b\u308b\u3068\u3001Pod \u306e\u7d42\u4e86\u6642\u306b ELB 502 \u30a8\u30e9\u30fc(CloudWatch \u30e1\u30c8\u30ea\u30af\u30b9\u306e HTTPCode_ELB_502_Count)\u304c\u51fa\u308b\u3068\u3059\u308c\u3070\u3001\u305d\u308c\u306f ALB \u306e \u30bf\u30fc\u30b2\u30c3\u30c8\u30b0\u30eb\u30fc\u30d7\u304b\u3089 Pod \u306e IP \u30a2\u30c9\u30ec\u30b9\u304c\u524a\u9664\u3055\u308c\u3066\u3044\u306a\u3044\u72b6\u614b\u3067\u3001Pod \u5185\u306e HTTP \u30ea\u30af\u30a8\u30b9\u30c8\u3092\u53d7\u3051\u308b\u30b3\u30f3\u30c6\u30ca\u304c\u7d42\u4e86\u3057\u305f(ALB \u304b\u3089\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u30ce\u30fc\u30c9\u306b\u5230\u9054\u3057\u3066\u3082 TCP RST \u304c\u8fd4\u3055\u308c\u308b\u72b6\u614b\u306b\u306a\u3063\u305f)\u30b1\u30fc\u30b9\u304c\u591a\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">Pod \u306e\u7d42\u4e86\u51e6\u7406(preStop \u30d5\u30c3\u30af\u3092\u547c\u3073\u51fa\u3057\u305f\u5f8c\u306b\u30b3\u30f3\u30c6\u30ca\u306b SIGTERM \u3092\u9001\u3063\u3066\u7d42\u4e86\u3055\u305b\u308b) \u3068 Service \u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u304b\u3089\u524a\u9664\u3059\u308b\u51e6\u7406\u306f\u975e\u540c\u671f\u3067\u884c\u308f\u308c\u308b\u305f\u3081\u3001\u4e0a\u8a18\u306e\u3088\u3046\u306a\u3053\u3068\u304c\u8d77\u3053\u308a\u5f97\u308b\u3088\u3046\u3067\u3059\u3002<\/span><\/p>\n<p><a href=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/eks_serviceout.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-20489 \" src=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/eks_serviceout-600x348.png\" alt=\"\" width=\"600\" height=\"348\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/eks_serviceout-600x348.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/eks_serviceout-276x160.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/eks_serviceout-768x446.png 768w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/eks_serviceout.png 799w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Pod \u306e\u7d42\u4e86\u51e6\u7406\u306b\u3064\u3044\u3066\u3001\u4ee5\u4e0b\u306e\u8a18\u4e8b\u304c\u5927\u5909\u53c2\u8003\u306b\u306a\u308a\u307e\u3059\u3002<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">\u30ea\u30f3\u30af: <\/span><a href=\"https:\/\/qiita.com\/superbrothers\/items\/3ac78daba3560ea406b2\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">https:\/\/qiita.com\/superbrothers\/items\/3ac78daba3560ea406b2<\/span><\/a><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u3053\u306e\u554f\u984c\u306e\u56de\u907f\u65b9\u6cd5\u3068\u3057\u3066\u3088\u304f\u898b\u308b\u65b9\u6cd5\u304c Pod \u306e\u7d42\u4e86\u51e6\u7406(preStop \u30d5\u30c3\u30af)\u306e\u4e2d\u3067 \u4e00\u5b9a\u6642\u9593 sleep \u3059\u308b\u3068\u3044\u3046\u65b9\u6cd5\u3067\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u672c\u30d7\u30ed\u30c0\u30af\u30c8\u3067\u306f\u3001Pod \u306e\u7d42\u4e86\u7336\u4e88\u6642\u9593(terminationGracePeriodSeconds, \u30c7\u30d5\u30a9\u30eb\u30c830\u79d2) \u3092 50\u79d2\u306b\u5909\u66f4\u3057\u305f\u4e0a\u3067\u3001preStop \u306e\u4e2d\u3067 40\u79d2\u9593 sleep \u3059\u308b\u3053\u3068\u3067\u3001\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u304b\u3089\u524a\u9664\u3055\u308c ALB \u306e\u30bf\u30fc\u30b2\u30c3\u30c8\u30b0\u30eb\u30fc\u30d7\u304b\u3089\u524a\u9664\u3055\u308c\u308b\u306e\u306b\u5341\u5206\u306a\u6642\u9593\u3092\u78ba\u4fdd\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/span><\/p>\n<p><a href=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/eks_sout_sleep.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-20490 \" src=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/eks_sout_sleep-600x347.png\" alt=\"\" width=\"600\" height=\"347\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/eks_sout_sleep-600x347.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/eks_sout_sleep-276x160.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/eks_sout_sleep-768x444.png 768w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/eks_sout_sleep.png 799w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<h3 id=\"anker622\"><b>AWS API \u30b3\u30fc\u30eb\u304c\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u3057\u3066\u3001\u30bf\u30fc\u30b2\u30c3\u30c8\u30b0\u30eb\u30fc\u30d7\u304b\u3089\u524a\u9664\u3059\u308b\u51e6\u7406\u304c\u9045\u5ef6\u3059\u308b<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">\u4e0a\u8a18\u306e\u3088\u3046\u306b\u3001Service \u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u304b\u3089\u524a\u9664\u3055\u308c\u3066\u30bf\u30fc\u30b2\u30c3\u30c8\u30b0\u30eb\u30fc\u30d7\u304b\u3089\u524a\u9664\u3055\u308c\u308b\u306e\u306b\u5341\u5206\u306a\u6642\u9593\u3092\u7f6e\u3044\u3066\u3044\u308b\u306b\u3082\u304b\u304b\u308f\u3089\u305a\u3001Pod \u6570\u304c\u591a\u304f\u306a\u308b\u3068\u30ed\u30fc\u30ea\u30f3\u30b0\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u6642\u306e ELB 502 \u30a8\u30e9\u30fc\u304c\u518d\u767a\u3057\u307e\u3057\u305f\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">EKS \u306e Audit \u30ed\u30b0(endpoint controller \u306e\u30ea\u30af\u30a8\u30b9\u30c8\u30ed\u30b0)\u3084 Pod \u306e\u7d42\u4e86\u6642\u30ed\u30b0\u3001AWS ALB Ingress Controller \u306e\u30ed\u30b0\u306a\u3069\u3092\u7a81\u304d\u5408\u308f\u305b\u3066\u307f\u308b\u3068\u3001Pod \u306e\u7d42\u4e86\u51e6\u7406\u306b\u79fb\u3063\u305f\u30bf\u30a4\u30df\u30f3\u30b0\u3067 Endpoints \u304b\u3089\u524a\u9664\u3055\u308c\u3066\u3044\u308b\u306b\u3082\u95a2\u308f\u3089\u305a\u3001ALB Ingress Controller \u304c\u30bf\u30fc\u30b2\u30c3\u30c8\u30b0\u30eb\u30fc\u30d7\u304b\u3089\u524a\u9664\u3059\u308b\u51e6\u7406\u304c\u9045\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3057\u305f\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u4f8b\u3068\u3057\u3066\u30bf\u30fc\u30b2\u30c3\u30c8\u30b0\u30eb\u30fc\u30d7\u304b\u3089\u306e\u524a\u9664\u304c\u9045\u308c\u305f Pod \u306b\u95a2\u3059\u308b\u30ed\u30b0\u3092\u6574\u5f62\u30fb\u629c\u7c8b\u3059\u308b\u3068\u3001<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">03:52:27: (Controller \/ kubelet) Pod \u524a\u9664\u958b\u59cb<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">03:52:27: (Endpoint Controller) Endpoints \u304b\u3089\u524a\u9664<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">03:53:07: Apache \u7d42\u4e86 (\u3053\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067 ALB \u304b\u3089\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u306f TCP RST \u304c\u8fd4\u3055\u308c\u3001ELB 502 \u30a8\u30e9\u30fc\u304c\u767a\u751f)<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">03:53:25: (ALB Ingress Controller) \u30bf\u30fc\u30b2\u30c3\u30c8\u30b0\u30eb\u30fc\u30d7\u304b\u3089\u524a\u9664<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u3068\u306a\u3063\u3066\u3044\u3066\u3001\u6b63\u5e38\u6642\u3067\u306a\u3089\u3070 03:52:27 \u9803\u306b\u30bf\u30fc\u30b2\u30c3\u30c8\u30b0\u30eb\u30fc\u30d7\u304b\u3089\u524a\u9664\u3055\u308c\u308b\u51e6\u7406\u304c\u884c\u308f\u308c\u308b\u306f\u305a\u3067\u3059\u304c\u3001\u4f55\u6545\u304b1\u5206\u7a0b\u5ea6\u9045\u308c\u3066 03:53:25 \u306b\u524a\u9664\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">ALB Ingress Controller \u306f\u305d\u306e\u9593\u4f55\u3092\u3057\u3066\u3044\u305f\u304b\u30ed\u30b0\u3092\u898b\u3066\u307f\u308b\u3068\u300103:51:30 ~ 03:53:22 \u306e\u9593\u6b62\u307e\u3063\u3066\u3044\u308b\u3088\u3046\u306b\u898b\u3048\u307e\u3057\u305f\u3002<\/span><\/p>\n<pre><code>I1120 03:51:30.245557       1 listener.go:283] production-ap\/api-ingress: Domain name '*.(\u7701\u7565)', matches TLS host '(\u7701\u7565)', adding to Listener\nI1120 03:51:30.245576       1 listener.go:236] production-ap\/api-ingress: Auto-detected and added 1 certificates to listener\nI1120 03:53:22.525821       1 listener.go:283] production-ap\/stg-ingress: Domain name '*.(\u7701\u7565)', matches TLS host '(\u7701\u7565)', adding to Listener\n--- \u7701\u7565 ---\nI1120 03:53:25.009571       1 targets.go:95] production-ap\/api-ingress: Removing targets from arn:aws:elasticloadbalancing:ap-northeast-1:(\u7701\u7565):targetgroup\/(\u7701\u7565): 10.111.34.200:80, 10.111.45.83:80, 10.111.37.96:80, 10.111.40.60:80, 10.111.37.73:80, 10.111.34.80:80, (\u7701\u7565)<\/code><\/pre>\n<p><a href=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/eks_alb_sleep.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-20491 \" src=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/eks_alb_sleep-600x318.png\" alt=\"\" width=\"600\" height=\"318\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/eks_alb_sleep-600x318.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/eks_alb_sleep-276x146.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/eks_alb_sleep.png 767w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u3055\u3089\u306b\u3001\u554f\u984c\u304c\u518d\u767a\u3057\u305f\u5225\u306e\u65e5\u306e CloudTrail \u306e API \u30b3\u30fc\u30eb\u306e\u30ed\u30b0\u629c\u7c8b\u3067\u3059\u304c\u3001ALB Ingress Controller \u304c\u6b62\u307e\u3063\u3066\u3044\u308b\u3088\u3046\u306b\u898b\u3048\u308b\u3068\u304d\u3001\u3069\u3046\u3082 API \u30b3\u30fc\u30eb\u304c\u9023\u7d9a\u3057\u3066\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u3057\u3066\u3044\u308b\u3088\u3046\u3067\u3057\u305f\u3002\u3053\u308c\u304c\u602a\u3057\u305d\u3046\u3067\u3059\u3002<\/span><\/p>\n<pre><code>2019-11-21 13:16:12.000 +0900   DescribeTargetGroups Throttling\n2019-11-21 13:16:13.000 +0900   DescribeTargetGroups Throttling\n2019-11-21 13:16:14.000 +0900   DescribeTargetGroups Throttling\n2019-11-21 13:16:18.000 +0900   DescribeTargetGroups Throttling\n2019-11-21 13:16:22.000 +0900   DescribeTargetGroups Throttling\n2019-11-21 13:16:36.000 +0900   DescribeTargetGroups Throttling\n2019-11-21 13:16:59.000 +0900   DescribeTargetGroups \u6210\u529f<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">ALB Ingress Controller \u306f aws-sdk-go \u3092\u5229\u7528\u3057\u3066\u3044\u3066\u3001\u3053\u306e SDK \u306b\u306f\u81ea\u52d5\u30ea\u30c8\u30e9\u30a4\u3068\u6307\u6570\u30d0\u30c3\u30af\u30aa\u30d5\u304c\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">\u53c2\u8003: <\/span><a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/general\/latest\/gr\/api-retries.html\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">https:\/\/docs.aws.amazon.com\/ja_jp\/general\/latest\/gr\/api-retries.html<\/span><\/a><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u3053\u308c\u306f\u30ea\u30c8\u30e9\u30a4\u56de\u6570\u304c\u5897\u3048\u308b\u3068\u3001\u6b21\u306e\u30ea\u30c8\u30e9\u30a4\u307e\u3067\u306e\u6642\u9593\u304c\u5f90\u3005\u306b\u9577\u304f\u306a\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">ALB Ingress Controller \u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u6700\u592710\u56de\u306e\u30ea\u30c8\u30e9\u30a4\u3092\u884c\u3046\u8a2d\u5b9a\u306a\u306e\u3067\u3001\u904b\u60aa\u304f\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u304c\u9023\u7d9a\u3057\u3066\u3057\u307e\u3046\u3068\u3001\u6700\u60aa\u30b1\u30fc\u30b9\u3067\u306f\u5206\u5358\u4f4d\u306e\u30ea\u30c8\u30e9\u30a4\u5f85\u3061\u304c\u767a\u751f\u3057\u3066\u3057\u307e\u3044\u3001\u305d\u306e\u30ea\u30c8\u30e9\u30a4\u5f85\u3061\u306b\u3088\u308a\u5f8c\u7d9a\u306e\u51e6\u7406\u304c\u9045\u5ef6\u3057\u3066\u3057\u307e\u3046\u3068\u3044\u3046\u306e\u304c\u4eca\u56de\u306e\u539f\u56e0\u306e\u3088\u3046\u3067\u3057\u305f\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u4eca\u56de\u306f\u66ab\u5b9a\u5bfe\u5fdc\u3068\u3057\u3066\u3053\u306e\u30ea\u30c8\u30e9\u30a4\u56de\u6570\u309210\u56de\u304b\u30894\u56de(<code>--aws-max-retries=4<\/code>)\u306b\u6e1b\u3089\u3059\u3053\u3068\u3067\u3001ELB 502 \u30a8\u30e9\u30fc\u306f\u89e3\u6d88\u3057\u307e\u3057\u305f\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">ALB Ingress Controller \u306b\u306f AWS API \u30b3\u30fc\u30eb\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u30ed\u30b0\u3092\u51fa\u529b\u3059\u308b\u30aa\u30d7\u30b7\u30e7\u30f3(<code>--aws-api-debug=true<\/code>)\u304c\u3042\u308b\u306e\u3067\u6709\u52b9\u5316\u3057\u305f\u4e0a\u3067\u3001\u5b9f\u969b\u306b4\u56de\u3067\u3001\u6700\u521d\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u304b\u308914\u79d2\u3067\u8ae6\u3081\u3066\u3044\u308b\u3053\u3068\u3082\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\u3002<\/span><\/p>\n<pre><code>I1125 05:28:49.824429 1 rules.go:82] production\/support-ingress: modifying rule 1 on arn:aws:elasticloadbalancing:ap-northeast-1:(\u7701\u7565):listener\/app\/(\u7701\u7565)\nI1125 05:28:49.824579 1 api.go:2573] Request: elasticloadbalancing\/ModifyRule, Payload: (\u7701\u7565)\nI1125 05:28:50.818095 1 api.go:2573] Request: elasticloadbalancing\/ModifyRule, Payload: (\u7701\u7565)\nI1125 05:28:52.612823 1 api.go:2573] Request: elasticloadbalancing\/ModifyRule, Payload: (\u7701\u7565)\nI1125 05:28:55.850761 1 api.go:2573] Request: elasticloadbalancing\/ModifyRule, Payload: (\u7701\u7565)\nI1125 05:29:03.261882 1 api.go:2573] Request: elasticloadbalancing\/ModifyRule, Payload: (\u7701\u7565)\nE1125 05:29:03.301916 1 api.go:2573] Failed request: elasticloadbalancing\/ModifyRule, (\u7701\u7565)\nstatus code: 400, request id: (\u7701\u7565)\nE1125 05:29:03.301939 1 rules.go:91] production\/support-ingress: failed modifying rule 1 on arn:aws:elasticloadbalancing:ap-northeast-1:(\u7701\u7565):listener\/app\/(\u7701\u7565) due to Throttling: Rate exceeded<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">\u6839\u672c\u7684\u306b\u306f\u3001<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">ip \u30e2\u30fc\u30c9\u3060\u3068 Pod \u306e\u5165\u308c\u66ff\u3048\u306e\u5ea6\u306b\u3001\u30bf\u30fc\u30b2\u30c3\u30c8\u30b0\u30eb\u30fc\u30d7\u3078\u306e\u8ffd\u52a0\u3068\u524a\u9664\u304c\u767a\u751f\u3057\u3066\u3057\u307e\u3044\u3001\u305d\u306e\u5ea6\u306b ALB \u5468\u308a\u306e Reconcile \u306e\u30eb\u30fc\u30d7\u304c\u8d70\u308b\u306e\u306f\u52b9\u7387\u304c\u60aa\u3044 (API \u30b3\u30fc\u30eb\u3082\u3069\u3046\u3057\u3066\u3082\u5897\u3048\u3066\u3057\u307e\u3046)<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u3068\u3044\u3046\u554f\u984c\u304c\u6b8b\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u6b21\u306e\u56f3\u306f\u3001\u30ed\u30fc\u30ea\u30f3\u30b0\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u6642\u306b ALB Ingress Controller \u304c\u3069\u306e\u3088\u3046\u306a API \u30b3\u30fc\u30eb\u3092\u9001\u3063\u3066\u3044\u308b\u304b\u3092\u793a\u3057\u305f\u3082\u306e\u3067\u3059\u3002<\/span><\/p>\n<p><a href=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2019\/12\/image2019-12-23_12-13-9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-20304 size-medium\" src=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2019\/12\/image2019-12-23_12-13-9-522x400.png\" alt=\"\" width=\"522\" height=\"400\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2019\/12\/image2019-12-23_12-13-9-522x400.png 522w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2019\/12\/image2019-12-23_12-13-9-261x200.png 261w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2019\/12\/image2019-12-23_12-13-9-768x588.png 768w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2019\/12\/image2019-12-23_12-13-9-830x636.png 830w\" sizes=\"auto, (max-width: 522px) 100vw, 522px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u30ed\u30fc\u30ea\u30f3\u30b0\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u6642\u306b\u304a\u3044\u3066\u91cd\u8981\u304b\u3064\u5c02\u5ff5\u3057\u3066\u307b\u3057\u3044\u306e\u306f\u3001\u30bf\u30fc\u30b2\u30c3\u30c8\u30b0\u30eb\u30fc\u30d7\u304b\u3089\u30bf\u30fc\u30b2\u30c3\u30c8\u3092\u8ffd\u52a0\u30fb\u524a\u9664\u3059\u308b API \u30b3\u30fc\u30eb(RegisterTargets, DeregisterTargets)\u3067\u3059\u304c\u3001<\/span><span style=\"font-weight: 400;\">\u305d\u308c\u4ee5\u5916\u306e API \u306b\u3082\u307e\u3093\u3079\u3093\u306a\u304f\u30a2\u30af\u30bb\u30b9\u3057\u3066\u304a\u308a\u3001Pod \u304c\u5165\u308c\u66ff\u308f\u308b\u5ea6\u306b ALB \u5468\u308a\u5168\u3066\u3092 Reconcile \u30eb\u30fc\u30d7\u3067\u8abf\u6574\u3059\u308b\u3068\u3044\u3046\u4ed5\u7d44\u307f\u3084\u4f7f\u3044\u65b9\u3060\u3068\u30aa\u30fc\u30d0\u30fc\u30d8\u30c3\u30c9\u304c\u5927\u304d\u3044\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u6839\u672c\u7684\u306a\u89e3\u6c7a\u306e\u305f\u3081\u3001instance \u30e2\u30fc\u30c9\u3067\u306e\u5229\u7528\u3084\u305d\u3082\u305d\u3082 ALB Ingress Controller \u3092\u4f7f\u308f\u306a\u3044\u69cb\u6210\u306b\u3064\u3044\u3066\u3082\u4eca\u5f8c\u306e\u8ab2\u984c\u3068\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u3053\u306e\u554f\u984c\u306b\u3064\u3044\u3066\u306f EBC \u3084\u30b5\u30dd\u30fc\u30c8\u3092\u901a\u3058\u3066\u30b5\u30fc\u30d3\u30b9\u30c1\u30fc\u30e0\u306b\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3057\u3066\u9802\u3044\u305f\u306e\u3067\u3001\u4eca\u5f8c\u306e\u6539\u5584\u306b\u671f\u5f85\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<h2 id=\"anker63\"><span style=\"font-weight: 400;\">\u4ed6\u306b\u3082<\/span><\/h2>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">CloudWatch Logs \u306b\u5168\u3066\u306e stdout \/ stderr \u30ed\u30b0\u3092\u9001\u3063\u3066\u3044\u305f\u3089\u3001\u53d6\u308a\u8fbc\u307f(Ingest) \u6599\u91d1\u304c\u9ad8\u304f\u306a\u3063\u305f<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 Pod \u304c stdout \u306b\u5410\u3044\u3066\u3044\u308b\u5206\u6790\u7528\u306e JSON \u30ed\u30b0\u3092\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306e \/var\/log\/containers \u4ee5\u4e0b\u304b\u3089\u56de\u53ce\u3057\u3066\u3044\u305f\u3068\u3053\u308d\u3001JSON \u30ed\u30b0\u304c 16KB \u3092\u8d85\u3048\u305f\u3042\u305f\u308a\u3067\u5206\u5272\u3055\u308c\u3066\u3057\u307e\u3044\u30d1\u30fc\u30b9\u3067\u304d\u306a\u304f\u306a\u308b<\/span>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">\u53c2\u8003: <\/span><a href=\"https:\/\/github.com\/kubernetes\/kubernetes\/issues\/52444\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">https:\/\/github.com\/kubernetes\/kubernetes\/issues\/52444<\/span><\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u3068\u3044\u3063\u305f\u3053\u3068\u306f\u3042\u308a\u307e\u3057\u305f\u304c\u4f7f\u3044\u65b9\u306e\u554f\u984c\u306b\u3088\u308b\u3082\u306e\u304c\u591a\u3044\u306e\u3067\u3001\u4eca\u56de\u306f\u8a73\u7d30\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u4e0a\u3067\u6319\u3052\u305f\u554f\u984c\u4ee5\u5916\u306f\u5927\u304d\u306a\u554f\u984c\u3082\u306a\u304f\u3001\u30b5\u30fc\u30d3\u30b9\u505c\u6b62\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u304c\u5fc5\u8981\u3068\u306a\u308b\u3088\u3046\u306a\u30b7\u30b9\u30c6\u30e0\u30c8\u30e9\u30d6\u30eb\u3082\u306a\u304f\u904b\u7528\u958b\u59cb\u3067\u304d\u3066\u304a\u308a\u307e\u3059\u3002<\/span><\/p>\n<h1 id=\"anker7\"><span style=\"font-weight: 400;\">\u304a\u308f\u308a\u306b<\/span><\/h1>\n<p><span style=\"font-weight: 400;\">EKS \u306e\u9032\u5316\u306f\u8457\u3057\u304f\u3001\u76f4\u8fd1\u3067\u306f Managed Node Groups \u3084 EKS on Fargate \u3068\u3044\u3063\u305f Node \u5468\u308a\u306e\u30de\u30cd\u30fc\u30b8\u30c9\u5316\u304c\u3060\u3044\u3076\u9032\u307f\u307e\u3057\u305f\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">AWS \u306e\u30b3\u30f3\u30c6\u30ca\u30ed\u30fc\u30c9\u30de\u30c3\u30d7\u3092\u898b\u308b\u3068\u3001\u4eca\u56de\u5c0e\u5165\u306b\u3042\u305f\u308a\u691c\u8a0e\u304c\u5fc5\u8981\u3060\u3063\u305f\u3053\u3068\u3082\u5c06\u6765\u7684\u306b\u306f\u4e0d\u8981\u3068\u306a\u308b\u3088\u3046\u306a\u6539\u5584\u304c\u4e88\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n<\/span><span style=\"font-weight: 400;\">\u4f8b\u3048\u3070\u3001VPC \u306e IP \u30a2\u30c9\u30ec\u30b9\u304c\u591a\u304f\u6d88\u8cbb\u3055\u308c\u308b\u8ab2\u984c\u306b\u5bfe\u3057\u3066\u306f\u300cNext Generation AWS VPC CNI Plugin\u300d\u3060\u3063\u305f\u308a\u3001Kubernetes \u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u6642\u306b\u81ea\u5206\u305f\u3061\u3067\u5165\u308c\u3066\u3044\u308b\u30a2\u30c9\u30aa\u30f3\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u4e92\u63db\u6027\u3068\u3044\u3046\u554f\u984c\u306b\u5bfe\u3057\u3066\u306f\u300cManaged Cluster Addons\u300d\u304c\u3042\u308b\u7a0b\u5ea6\u89e3\u6c7a\u3057\u3066\u304f\u308c\u305d\u3046\u3067\u3059\u3002<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">[EKS]: Next Generation AWS VPC CNI Plugin #398: <\/span><a href=\"https:\/\/github.com\/aws\/containers-roadmap\/issues\/398\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">https:\/\/github.com\/aws\/containers-roadmap\/issues\/398<\/span><\/a><\/li>\n<li><span style=\"font-weight: 400;\">[EKS]: Managed Cluster Addons #252: <\/span><a href=\"https:\/\/github.com\/aws\/containers-roadmap\/issues\/252\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">https:\/\/github.com\/aws\/containers-roadmap\/issues\/252<\/span><\/a><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u672c\u756a\u74b0\u5883\u3067\u306e\u5c0e\u5165\u4e8b\u4f8b\u304c\u5897\u3048\u308c\u3070\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u304c\u5897\u3048\u3066\u3055\u3089\u306b\u826f\u304f\u306a\u3063\u3066\u3044\u304f\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001\u63a1\u7528\u4e8b\u4f8b\u304c\u3082\u3063\u3068\u5897\u3048\u3066\u304f\u308c\u308b\u3068\u826f\u3044\u306a\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b \u3053\u3093\u306b\u3061\u306f\u3001\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u90e8\u306e\u52a0\u85e4\u3067\u3059\u3002 \u3053\u306e\u5ea6\u3001\u65b0\u898f\u30b9\u30de\u30db\u30b2\u30fc\u30e0\u306e API \u30b5\u30fc\u30d0\u306e\u90e8\u5206\u3067 Amazon Elastic Kubernetes Service (EKS) \u3092\u4f7f\u3063\u305f\u3082\u306e\u304c\u6b63\u5f0f\u30ea\u30ea\u30fc\u30b9\u3057\u307e [&hellip;]<\/p>\n","protected":false},"author":222,"featured_media":20362,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[114,200,143],"class_list":["post-20271","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-info","tag-aws","tag-eks","tag-kubernetes"],"jetpack_featured_media_url":"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2020\/01\/Untitled-1.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/20271","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/users\/222"}],"replies":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/comments?post=20271"}],"version-history":[{"count":3,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/20271\/revisions"}],"predecessor-version":[{"id":20387,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/20271\/revisions\/20387"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/media\/20362"}],"wp:attachment":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/media?parent=20271"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/categories?post=20271"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/tags?post=20271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}