{"id":226,"date":"2023-05-20T18:18:26","date_gmt":"2023-05-20T09:18:26","guid":{"rendered":"https:\/\/www.gyuroot.com\/wordpress\/?p=226"},"modified":"2023-05-20T18:52:17","modified_gmt":"2023-05-20T09:52:17","slug":"kubernetes-template","status":"publish","type":"post","link":"https:\/\/www.gyuroot.com\/wordpress\/?p=226","title":{"rendered":"[Kubernetes] Template"},"content":{"rendered":"\n<pre class=\"wp-block-preformatted\">\ud83d\udd20 \ucfe0\ubc84\ub124\ud2f0\uc2a4 \ud074\ub7ec\uc2a4\ud130\uc758 \uc624\ube0c\uc81d\ud2b8\ub098 \ucee8\ud2b8\ub864\ub7ec\uac00 \uc5b4\ub5a4 \uc0c1\ud0dc\uc5ec\uc57c \ud558\ub294\uc9c0\ub97c \uc801\uc6a9\ud560 \ub54c\ub294 YAML\ud615\uc2dd\uc758 \ud15c\ud50c\ub9bf\uc744 \uc0ac\uc6a9\ud569\ub2c8\ub2e4.<\/pre>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" style=\"font-size:.875rem;line-height:1.25rem\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"# \ud15c\ud50c\ub9bf \uae30\ubcf8 \ud615\uc2dd\napiVersion: v1\nkind: Pod\nmetadata: \nspec: \" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #616E88\"># \ud15c\ud50c\ub9bf \uae30\ubcf8 \ud615\uc2dd<\/span><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">apiVersion<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">v1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">kind<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">Pod<\/span><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">metadata<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">spec<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul>\n<li>apiVersion\n<ul>\n<li>\uc0ac\uc6a9\ud558\ub824\ub294 \ucfe0\ubc84\ub124\ud2f0\uc2a4 API \ubc84\uc804\uc744 \uba85\uc2dc\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li>\ucfe0\ubc84\ub124\ud2f0\uc2a4\ub294 \ubc84\uc804 \ubcc0\uacbd\uc774 \ube60\ub978 \ud3b8\uc774\ubbc0\ub85c \uc5ec\ub7ec\uac00\uc9c0 API \ubc84\uc804\uc774 \uc788\uc73c\ubbc0\ub85c API \ubc84\uc804\uc744 \uc815\ud655\ud558\uac8c \uc9c0\uc815\ud558\ub294\uac83\uc774 \uc911\uc694\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><code>kubectl api-versions<\/code> \uba85\ub839\uc73c\ub85c \ud604\uc7ac \ud074\ub7ec\uc2a4\ud130\uc5d0\uc11c \uc0ac\uc6a9 \uac00\ub2a5\ud55c API \ubc84\uc804\uc744 \ud655\uc778<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Kind\n<ul>\n<li>\uc5b4\ub5a4 \uc885\ub958\uc758 \uc624\ube0c\uc81d\ud2b8 \ubc0f \ucee8\ud2b8\ub864\ub7ec\uc5d0 \uc791\uc5c5\uc778\uc9c0 \uba85\uc2dc<\/li>\n\n\n\n<li>e.g : Pod, Deployment, Ingress, Service<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>metadata<\/li>\n\n\n\n<li>spec\n<ul>\n<li>pod\uac00 \uc5b4\ub5a4 \ucee8\ud14c\uc774\ub108\ub97c \uac16\uace0 \uc2e4\ud589\ud558\uba70, \uc2e4\ud589\ud560 \ub54c \uc5b4\ub5bb\uac8c \ub3d9\uc791\ud574\uc57c \ud560\uc9c0 \uba85\uc2dc<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p class=\"has-small-font-size\">\ud15c\ud50c\ub9bf\uc5d0\uc11c \ud558\uc704 \ud544\ub4dc\ub85c \ubb34\uc5c7\uc774 \uc788\ub294\uc9c0 <code>kubectl explain pods<\/code> \uba85\ub839\uc73c\ub85c \ud655\uc778\uc774 \uac00\ub2a5\ud558\ub2e4<br>\ucd94\uac00 \ud558\uc704 \ud544\ub4dc : <code>kubectl explain pods.spec<\/code><br>\uc124\uba85 \uc5c6\uc774 \ubaa8\ub4e0 \ud558\uc704 \ud544\ub4dc \ucd9c\ub825 : <code>kubectl explain pods<\/code> <strong>&#8211;recursive<\/strong><\/p>\n<\/blockquote>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" style=\"font-size:.875rem;line-height:1.25rem\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"# example\n$ kubectl explain pods\nKIND:     Pod\nVERSION:  v1\n\nDESCRIPTION:\n     Pod is a collection of containers that can run on a host. This resource is\n     created by clients and scheduled onto hosts.\n\nFIELDS:\n   apiVersion   &lt;string&gt;\n     APIVersion defines the versioned schema of this representation of an\n     object. Servers should convert recognized schemas to the latest internal\n     value, and may reject unrecognized values. More info:\n     https:\/\/git.k8s.io\/community\/contributors\/devel\/sig-architecture\/api-conventions.md#resources\n\n   kind &lt;string&gt;\n     Kind is a string value representing the REST resource this object\n     represents. Servers may infer this from the endpoint the client submits\n     requests to. Cannot be updated. In CamelCase. More info:\n     https:\/\/git.k8s.io\/community\/contributors\/devel\/sig-architecture\/api-conventions.md#types-kinds\n\n   metadata     &lt;Object&gt;\n     Standard object's metadata. More info:\n     https:\/\/git.k8s.io\/community\/contributors\/devel\/sig-architecture\/api-conventions.md#metadata\n\n   spec &lt;Object&gt;\n     Specification of the desired behavior of the pod. More info:\n     https:\/\/git.k8s.io\/community\/contributors\/devel\/sig-architecture\/api-conventions.md#spec-and-status\n\n   status       &lt;Object&gt;\n     Most recently observed status of the pod. This data may not be up to date.\n     Populated by the system. Read-only. More info:\n     https:\/\/git.k8s.io\/community\/contributors\/devel\/sig-architecture\/api-conventions.md#spec-and-status\n\n# \ud558\uc704 \ud544\ub4dc\uae4c\uc9c0\uc758 \uc815\ubcf4\ub97c \ud655\uc778\ud558\uace0 \uc2f6\uc73c\uba74 \uc544\ub798\uc640 \uac19\uc774 .\uc785\ub825\ud6c4 \ud544\ub4dc\ub97c \uc785\ub825\ud574\uc8fc\uba74 \ub41c\ub2e4.\n$ kubectl explain pods.spec\n# \ud544\ub4dc \uc124\uba85 \uc5c6\uc774 \ud2b9\uc815 \ud544\ub4dc\uc640 \uadf8 \uc544\ub798\uc5d0 \uc18d\ud55c \ubaa8\ub4e0 \ud558\uc704 \ud544\ub4dc\ub97c \ud55c\uaebc\ubc88\uc5d0 \ubcf4\ub824\uba74 --recursive \uc635\uc158\uc744 \uc0ac\uc6a9\n$ kubectl explain pods --recursive\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #616E88\"># example<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A3BE8C\">$ kubectl explain pods<\/span><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">KIND<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #A3BE8C\">Pod<\/span><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">VERSION<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #A3BE8C\">v1<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">DESCRIPTION<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #A3BE8C\">Pod is a collection of containers that can run on a host. This resource is<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #A3BE8C\">created by clients and scheduled onto hosts.<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">FIELDS<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">   <\/span><span style=\"color: #A3BE8C\">apiVersion   &lt;string&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #A3BE8C\">APIVersion defines the versioned schema of this representation of an<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #A3BE8C\">object. Servers should convert recognized schemas to the latest internal<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #8FBCBB\">value, and may reject unrecognized values. More info<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #A3BE8C\">https:\/\/git.k8s.io\/community\/contributors\/devel\/sig-architecture\/api-conventions.md#resources<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">   <\/span><span style=\"color: #A3BE8C\">kind &lt;string&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #A3BE8C\">Kind is a string value representing the REST resource this object<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #A3BE8C\">represents. Servers may infer this from the endpoint the client submits<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #8FBCBB\">requests to. Cannot be updated. In CamelCase. More info<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #A3BE8C\">https:\/\/git.k8s.io\/community\/contributors\/devel\/sig-architecture\/api-conventions.md#types-kinds<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">   <\/span><span style=\"color: #A3BE8C\">metadata     &lt;Object&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #8FBCBB\">Standard object&#39;s metadata. More info<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #A3BE8C\">https:\/\/git.k8s.io\/community\/contributors\/devel\/sig-architecture\/api-conventions.md#metadata<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">   <\/span><span style=\"color: #A3BE8C\">spec &lt;Object&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #8FBCBB\">Specification of the desired behavior of the pod. More info<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #A3BE8C\">https:\/\/git.k8s.io\/community\/contributors\/devel\/sig-architecture\/api-conventions.md#spec-and-status<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">   <\/span><span style=\"color: #A3BE8C\">status       &lt;Object&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #A3BE8C\">Most recently observed status of the pod. This data may not be up to date.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #8FBCBB\">Populated by the system. Read-only. More info<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #A3BE8C\">https:\/\/git.k8s.io\/community\/contributors\/devel\/sig-architecture\/api-conventions.md#spec-and-status<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #616E88\"># \ud558\uc704 \ud544\ub4dc\uae4c\uc9c0\uc758 \uc815\ubcf4\ub97c \ud655\uc778\ud558\uace0 \uc2f6\uc73c\uba74 \uc544\ub798\uc640 \uac19\uc774 .\uc785\ub825\ud6c4 \ud544\ub4dc\ub97c \uc785\ub825\ud574\uc8fc\uba74 \ub41c\ub2e4.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A3BE8C\">$ kubectl explain pods.spec<\/span><\/span>\n<span class=\"line\"><span style=\"color: #616E88\"># \ud544\ub4dc \uc124\uba85 \uc5c6\uc774 \ud2b9\uc815 \ud544\ub4dc\uc640 \uadf8 \uc544\ub798\uc5d0 \uc18d\ud55c \ubaa8\ub4e0 \ud558\uc704 \ud544\ub4dc\ub97c \ud55c\uaebc\ubc88\uc5d0 \ubcf4\ub824\uba74 --recursive \uc635\uc158\uc744 \uc0ac\uc6a9<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A3BE8C\">$ kubectl explain pods --recursive<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udd20 \ucfe0\ubc84\ub124\ud2f0\uc2a4 \ud074\ub7ec\uc2a4\ud130\uc758 \uc624\ube0c\uc81d\ud2b8\ub098 \ucee8\ud2b8\ub864\ub7ec\uac00 \uc5b4\ub5a4 \uc0c1\ud0dc\uc5ec\uc57c \ud558\ub294\uc9c0\ub97c \uc801\uc6a9\ud560 \ub54c\ub294 YAML\ud615\uc2dd\uc758 \ud15c\ud50c\ub9bf\uc744 \uc0ac\uc6a9\ud569\ub2c8\ub2e4. \ud15c\ud50c\ub9bf\uc5d0\uc11c \ud558\uc704 \ud544\ub4dc\ub85c \ubb34\uc5c7\uc774 \uc788\ub294\uc9c0 kubectl explain pods \uba85\ub839\uc73c\ub85c \ud655\uc778\uc774 \uac00\ub2a5\ud558\ub2e4\ucd94\uac00 \ud558\uc704 \ud544\ub4dc : kubectl explain pods.spec\uc124\uba85 \uc5c6\uc774 \ubaa8\ub4e0 \ud558\uc704 \ud544\ub4dc \ucd9c\ub825 : kubectl explain pods &#8211;recursive<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":""},"categories":[13],"tags":[],"_links":{"self":[{"href":"https:\/\/www.gyuroot.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/226"}],"collection":[{"href":"https:\/\/www.gyuroot.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gyuroot.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gyuroot.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gyuroot.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=226"}],"version-history":[{"count":4,"href":"https:\/\/www.gyuroot.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/226\/revisions"}],"predecessor-version":[{"id":237,"href":"https:\/\/www.gyuroot.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/226\/revisions\/237"}],"wp:attachment":[{"href":"https:\/\/www.gyuroot.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gyuroot.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gyuroot.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}