{"id":4689,"date":"2023-10-29T12:43:37","date_gmt":"2023-10-29T03:43:37","guid":{"rendered":"https:\/\/engineer-chanpu.blog\/?p=4689"},"modified":"2025-01-27T09:57:49","modified_gmt":"2025-01-27T00:57:49","slug":"kubernetes-cluster-%ec%9d%b4%ed%95%b4%ed%95%98%ea%b8%b0-2023%eb%85%84-%ec%b4%88%eb%b3%b4%ec%9e%90-%ea%b0%80%ec%9d%b4%eb%93%9c","status":"publish","type":"post","link":"https:\/\/engineer-chanpu.blog\/?p=4689","title":{"rendered":"Kubernetes: Cluster \uc774\ud574\ud558\uae30"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Kubernetes Cluster<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Concept<\/h3>\n\n\n\n<p>&#8220;\ud074\ub7ec\uc2a4\ud130&#8221;\ub294 \ucef4\ud4e8\ud130 \ub124\ud2b8\uc6cc\ud0b9 \ubc0f \ubd84\uc0b0 \uc2dc\uc2a4\ud15c\uc758 \uc601\uc5ed\uc5d0\uc11c \uc5ec\ub7ec \ub300\uc758 \ucef4\ud4e8\ud130 \ub610\ub294 \uc11c\ubc84\uac00 \ubaa8\uc5ec \ud558\ub098\uc758 \ub2e8\uc77c \uc2dc\uc2a4\ud15c\ucc98\ub7fc \uc791\ub3d9\ud558\ub294 \uad6c\uc131\uc744 \uc758\ubbf8\ud569\ub2c8\ub2e4. <br>\ud074\ub7ec\uc2a4\ud130\ub294<mark style=\"background-color:#000000\" class=\"has-inline-color has-luminous-vivid-amber-color\"> \uace0\uac00\uc6a9\uc131, \ubd80\ud558 \ubd84\uc0b0, \ud655\uc7a5\uc131 <\/mark>\ub4f1\uc758 \uc774\uc810\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/kubernetes.io\/docs\/concepts\/overview\/components\/\"><img loading=\"lazy\" decoding=\"async\" width=\"1252\" height=\"585\" src=\"https:\/\/engineer-chanpu.blog\/wp-content\/uploads\/2023\/10\/components-of-kubernetes.svg\" alt=\"\" class=\"wp-image-4690\"\/><\/a><\/figure>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"988\" height=\"921\" src=\"https:\/\/engineer-chanpu.blog\/wp-content\/uploads\/2023\/10\/\u3044\u307f\u308f\u304b\u3093\u306a\u3044.jpg\" alt=\"\" class=\"wp-image-4703\" style=\"aspect-ratio:1.0727470141150923;width:424px;height:auto\" srcset=\"https:\/\/engineer-chanpu.blog\/wp-content\/uploads\/2023\/10\/\u3044\u307f\u308f\u304b\u3093\u306a\u3044.jpg 988w, https:\/\/engineer-chanpu.blog\/wp-content\/uploads\/2023\/10\/\u3044\u307f\u308f\u304b\u3093\u306a\u3044-300x280.jpg 300w, https:\/\/engineer-chanpu.blog\/wp-content\/uploads\/2023\/10\/\u3044\u307f\u308f\u304b\u3093\u306a\u3044-768x716.jpg 768w\" sizes=\"auto, (max-width: 988px) 100vw, 988px\" \/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">Features<\/h3>\n\n\n\n<p>\ucfe0\ubc84\ub124\ud2f0\uc2a4(Kubernetes) <sup data-fn=\"8438f83f-25a7-4da6-a4e2-b61da4d01a62\" class=\"fn\"><a href=\"#8438f83f-25a7-4da6-a4e2-b61da4d01a62\" id=\"8438f83f-25a7-4da6-a4e2-b61da4d01a62-link\">1<\/a><\/sup>\ucee8\ud14d\uc2a4\ud2b8\uc5d0\uc11c \ud074\ub7ec\uc2a4\ud130\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \ud2b9\uc131\uacfc \uad6c\uc131 \uc694\uc18c\ub85c \uc774\ub8e8\uc5b4\uc838 \uc788\uc2b5\ub2c8\ub2e4:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\ub178\ub4dc (Node)<\/strong>:\n<ul class=\"wp-block-list\">\n<li>\ucfe0\ubc84\ub124\ud2f0\uc2a4 \ud074\ub7ec\uc2a4\ud130\uc758 \uae30\ubcf8 \uc6cc\ud0b9 \uc720\ub2db\uc785\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>\ub9c8\uc2a4\ud130 \ub178\ub4dc (Control Plane Node)<\/strong>: \ud074\ub7ec\uc2a4\ud130\uc758 \uad00\ub9ac\uc640 \uc870\uc815\uc744 \ub2f4\ub2f9\ud569\ub2c8\ub2e4. <br>API \uc11c\ubc84, etcd, \ucee8\ud2b8\ub864\ub7ec \ub9e4\ub2c8\uc800, \uc2a4\ucf00\uc904\ub7ec \ub4f1\uc758 \ucef4\ud3ec\ub10c\ud2b8\ub97c \ud3ec\ud568\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>\uc6cc\ucee4 \ub178\ub4dc (Worker Node)<\/strong>: \uc2e4\uc81c \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uc6cc\ud06c\ub85c\ub4dc(\ucee8\ud14c\uc774\ub108)\uac00 \uc2e4\ud589\ub418\ub294 \ub178\ub4dc\uc785\ub2c8\ub2e4. <br>Kubelet, Kube Proxy \ub4f1\uc758 \ucef4\ud3ec\ub10c\ud2b8\ub97c \ud3ec\ud568\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.startkubernetes.com\/blog\/k8s_master_and_worker_nodes\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"479\" src=\"https:\/\/engineer-chanpu.blog\/wp-content\/uploads\/2023\/10\/k8s-architecture-1-1024x479.png\" alt=\"\" class=\"wp-image-4718\" srcset=\"https:\/\/engineer-chanpu.blog\/wp-content\/uploads\/2023\/10\/k8s-architecture-1-1024x479.png 1024w, https:\/\/engineer-chanpu.blog\/wp-content\/uploads\/2023\/10\/k8s-architecture-1-300x140.png 300w, https:\/\/engineer-chanpu.blog\/wp-content\/uploads\/2023\/10\/k8s-architecture-1-768x359.png 768w, https:\/\/engineer-chanpu.blog\/wp-content\/uploads\/2023\/10\/k8s-architecture-1-1536x718.png 1536w, https:\/\/engineer-chanpu.blog\/wp-content\/uploads\/2023\/10\/k8s-architecture-1-2048x958.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\"><a href=\"https:\/\/www.startkubernetes.com\/blog\">https:\/\/www.startkubernetes.com\/blog<\/a><\/figcaption><\/figure>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\ud30c\ub4dc (Pod)<\/strong>:\n<ul class=\"wp-block-list\">\n<li>\ucfe0\ubc84\ub124\ud2f0\uc2a4\uc5d0\uc11c \uac00\uc7a5 \uc791\uc740 \ubc30\ud3ec \ub2e8\uc704\uc785\ub2c8\ub2e4.<\/li>\n\n\n\n<li>\ud558\ub098 \uc774\uc0c1\uc758 \ucee8\ud14c\uc774\ub108\ub97c \ud3ec\ud568\ud558\uba70, \uac19\uc740 \ub178\ub4dc\uc5d0\uc11c \ud568\uaed8 \uc2e4\ud589\ub429\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\uc11c\ube44\uc2a4 (Service)<\/strong>:\n<ul class=\"wp-block-list\">\n<li>\ud30c\ub4dc \uadf8\ub8f9\uc5d0 \ub300\ud55c \uc548\uc815\uc801\uc778 \uc811\uadfc \uc8fc\uc18c\ub97c \uc81c\uacf5\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li>\ud074\ub7ec\uc2a4\ud130 \ub0b4\ubd80 \ub610\ub294 \uc678\ubd80\uc5d0\uc11c \ud30c\ub4dc \uadf8\ub8f9\uc5d0 \ub124\ud2b8\uc6cc\ud06c \uc561\uc138\uc2a4\ub97c \uc81c\uacf5\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>etcd<\/strong>:\n<ul class=\"wp-block-list\">\n<li>\ucfe0\ubc84\ub124\ud2f0\uc2a4 \ud074\ub7ec\uc2a4\ud130\uc758 \uc124\uc815 \uc815\ubcf4\uc640 \uc0c1\ud0dc \uc815\ubcf4\ub97c \uc800\uc7a5\ud558\ub294 \ubd84\uc0b0 \ud0a4-\uac12 \uc800\uc7a5\uc18c\uc785\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>API \uc11c\ubc84<\/strong>:\n<ul class=\"wp-block-list\">\n<li>\ud074\ub7ec\uc2a4\ud130\uc640 \ud1b5\uc2e0\ud558\ub294 \uc8fc\uc694 \uc5d4\ub4dc\ud3ec\uc778\ud2b8\uc785\ub2c8\ub2e4. <br><code>kubectl<\/code>\uacfc \uac19\uc740 \ub3c4\uad6c\ub098 \ub0b4\ubd80 \ucef4\ud3ec\ub10c\ud2b8\ub4e4\uc774 \ucfe0\ubc84\ub124\ud2f0\uc2a4 API \uc11c\ubc84\ub97c \ud1b5\ud574 \ud074\ub7ec\uc2a4\ud130\uc640 \uc18c\ud1b5\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\ucee8\ud2b8\ub864\ub7ec (Controller)<\/strong>:\n<ul class=\"wp-block-list\">\n<li>\ud074\ub7ec\uc2a4\ud130\uc758 \uc0c1\ud0dc\ub97c \uad00\ub9ac\ud558\uace0, \uc6d0\ud558\ub294 \uc0c1\ud0dc(Desired State)\ub97c \uc720\uc9c0\ud558\uae30 \uc704\ud55c \uc790\ub3d9\ud654\ub41c \ub17c\ub9ac\ub97c \uc2e4\ud589\ud558\ub294 \uad6c\uc131 \uc694\uc18c\uc785\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\uc2a4\ucf00\uc904\ub7ec<\/strong>:\n<ul class=\"wp-block-list\">\n<li>\ud30c\ub4dc\ub97c \uc801\uc808\ud55c \uc6cc\ucee4 \ub178\ub4dc\uc5d0 \ubc30\uce58\ud558\ub294 \uc5ed\ud560\uc744 \ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>\ucfe0\ubc84\ub124\ud2f0\uc2a4 \ud074\ub7ec\uc2a4\ud130\ub294 \uc774\ub7ec\ud55c \ucef4\ud3ec\ub10c\ud2b8\uc640 \ub9ac\uc18c\uc2a4\ub97c \ud1b5\ud569\ud558\uc5ec<mark style=\"background-color:#000000\" class=\"has-inline-color has-luminous-vivid-amber-color\"> \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc758 \ubc30\ud3ec, \ud655\uc7a5 \ubc0f \uad00\ub9ac\ub97c \ub2e8\uc21c\ud654\ud558\uace0 \uc790\ub3d9\ud654<\/mark>\ud569\ub2c8\ub2e4. <br>\ud074\ub7ec\uc2a4\ud130\ub97c \uc0ac\uc6a9\ud568\uc73c\ub85c\uc368 \uc0ac\uc6a9\uc790\ub294 \ub2e8\uc77c \ub178\ub4dc\uc5d0\uc11c\uc758 \uc2e4\ud328, \ub9ac\uc18c\uc2a4 \uc81c\ud55c \ub4f1\uc758 \ubb38\uc81c\ub97c \ucd5c\uc18c\ud654\ud558\uace0, \ud655\uc7a5\uc131, \ubd80\ud558 \ubd84\uc0b0, \ub192\uc740 \uac00\uc6a9\uc131 \ub4f1\uc758 \uc774\uc810\uc744 \uc5bb\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n<ol class=\"wp-block-footnotes\"><li id=\"8438f83f-25a7-4da6-a4e2-b61da4d01a62\">Note: What is context? <a href=\"#8438f83f-25a7-4da6-a4e2-b61da4d01a62-link\" aria-label=\"Jump to footnote reference 1\">\u21a9\ufe0e<\/a><\/li><\/ol>\n\n\n<h3 class=\"wp-block-heading\">Kubernetes Context<\/h3>\n\n\n\n<p>\ucfe0\ubc84\ub124\ud2f0\uc2a4(Kubernetes)\uc5d0\uc11c &#8220;\ucee8\ud14d\uc2a4\ud2b8(context)&#8221;\ub294 <code>kubectl<\/code> \uc0ac\uc6a9\uc790\uac00 \uc5ec\ub7ec \ucfe0\ubc84\ub124\ud2f0\uc2a4 \ud074\ub7ec\uc2a4\ud130\uc640 \uc11c\ub85c \ub2e4\ub978 \uc0ac\uc6a9\uc790\ub85c\uc11c \ub610\ub294 \ub2e4\uc591\ud55c \ub124\uc784\uc2a4\ud398\uc774\uc2a4 \ub0b4\uc5d0\uc11c \uc791\uc5c5\ud560 \ub54c \ud544\uc694\ud55c <mark style=\"background-color:#000000\" class=\"has-inline-color has-luminous-vivid-amber-color\">\ud074\ub7ec\uc2a4\ud130 \ubc0f \uc0ac\uc6a9\uc790 \uad6c\uc131 \uc815\ubcf4\uc758 \uc9d1\ud569<\/mark>\uc744 \ub098\ud0c0\ub0c5\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\ucfe0\ubc84\ub124\ud2f0\uc2a4 \ud074\ub7ec\uc2a4\ud130\uc640 \uc0c1\ud638 \uc791\uc6a9\ud558\ub294 \uac1c\ubc1c\uc790\ub098 \uc2dc\uc2a4\ud15c \uad00\ub9ac\uc790\ub294 \uc885\uc885 \uc5ec\ub7ec \ud074\ub7ec\uc2a4\ud130\uc640 \uc11c\ub85c \ub2e4\ub978 \uad8c\ud55c\uc744 \uac00\uc9c4 \uc5ec\ub7ec \uc0ac\uc6a9\uc790 \uc778\uc99d\uc11c\ub85c \uc791\uc5c5\ud574\uc57c \ud560 \ub54c\uac00 \uc788\uc2b5\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uba74, \uac1c\ubc1c \ud658\uacbd, \uc2a4\ud14c\uc774\uc9d5 \ud658\uacbd \ubc0f \ud504\ub85c\ub355\uc158 \ud658\uacbd\uacfc \uac19\uc740 \uc5ec\ub7ec \ud074\ub7ec\uc2a4\ud130\uc5d0 \ub300\ud55c \uc811\uadfc\uc774 \ud544\uc694\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<p><code>kubectl<\/code>\uc740 <code>~\/.kube\/config<\/code>\ub77c\ub294 \ud30c\uc77c\uc5d0\uc11c \uc774\ub7ec\ud55c \uad6c\uc131 \uc815\ubcf4\ub97c \uad00\ub9ac\ud569\ub2c8\ub2e4. <br>\uc774 \ud30c\uc77c \ub0b4\uc5d0\uc11c, \ub2f9\uc2e0\uc740 \uc5ec\ub7ec \ud074\ub7ec\uc2a4\ud130, \uc0ac\uc6a9\uc790, \uadf8\ub9ac\uace0 \ub124\uc784\uc2a4\ud398\uc774\uc2a4 \uad6c\uc131\uc744 \uac00\uc9c8 \uc218 \uc788\uc73c\uba70<br>\ucee8\ud14d\uc2a4\ud2b8\ub294 \uc138 \uac00\uc9c0 \uc124\uc815\uc758 \ud2b9\uc815 \uc870\ud569\uc744 \ucc38\uc870\ud569\ub2c8\ub2e4.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<ol class=\"wp-block-list\">\n<li>\ud074\ub7ec\uc2a4\ud130 (Cluster)<\/li>\n\n\n\n<li>\uc0ac\uc6a9\uc790 (User)<\/li>\n\n\n\n<li>\ub124\uc784\uc2a4\ud398\uc774\uc2a4 (Namespace)<\/li>\n<\/ol>\n<\/div>\n<\/div>\n\n\n\n<h4 class=\"wp-block-heading\">The output shows the two clusters, two users, and three contexts:<\/h4>\n\n\n\n<p>Kubernetes Document: <a href=\"https:\/\/kubernetes.io\/docs\/tasks\/access-application-cluster\/configure-access-multiple-clusters\/\">Define clusters, users, and contexts<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code alignwide\"><code><sub>apiVersion: v1\nclusters:\n- cluster:\n    certificate-authority: fake-ca-file\n    server: https:\/\/1.2.3.4\n  name: development\n- cluster:\n    insecure-skip-tls-verify: true\n    server: https:\/\/5.6.7.8\n  name: test\ncontexts:\n- context:\n    cluster: development\n    namespace: frontend\n    user: developer\n  name: dev-frontend\n- context:\n    cluster: development\n    namespace: storage\n    user: developer\n  name: dev-storage\n- context:\n    cluster: test\n    namespace: default\n    user: experimenter\n  name: exp-test\ncurrent-context: \"\"\nkind: Config\npreferences: {}\nusers:\n- name: developer\n  user:\n    client-certificate: fake-cert-file\n    client-key: fake-key-file\n- name: experimenter\n  user:\n    # Documentation note (this comment is NOT part of the command output).\n    # Storing passwords in Kubernetes client config is risky.\n    # A better alternative would be to use a credential plugin\n    # and store the credentials separately.\n    # See https:\/\/kubernetes.io\/docs\/reference\/access-authn-authz\/authentication\/#client-go-credential-plugins\n    password: some-password\n    username: exp<\/sub><\/code><\/pre>\n\n\n\n<p><code>kubectl<\/code>\uc744 \uc0ac\uc6a9\ud558\uc5ec \ud604\uc7ac \ucee8\ud14d\uc2a4\ud2b8\ub97c \uc870\ud68c\ud558\uac70\ub098 \ubcc0\uacbd\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\ud604\uc7ac \ucee8\ud14d\uc2a4\ud2b8 \uc870\ud68c<\/strong>: <code>kubectl config current-context<\/code><\/li>\n\n\n\n<li><strong>\ucee8\ud14d\uc2a4\ud2b8 \ubaa9\ub85d \uc870\ud68c<\/strong>: <code>kubectl config get-contexts<\/code><\/li>\n\n\n\n<li><strong>\ucee8\ud14d\uc2a4\ud2b8 \ubcc0\uacbd<\/strong>: <code>kubectl config use-context [CONTEXT_NAME]<\/code><\/li>\n<\/ul>\n\n\n\n<p>\uc774\ub7ec\ud55c \ucee4\ub9e8\ub4dc\ub97c \uc0ac\uc6a9\ud558\uba74 \uc5ec\ub7ec \ucfe0\ubc84\ub124\ud2f0\uc2a4 \ud658\uacbd \ubc0f \uad6c\uc131 \uac04\uc5d0 \uc27d\uac8c \uc804\ud658\ud558\uba74\uc11c \uc791\uc5c5\uc744 \uc218\ud589\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"633\" src=\"https:\/\/engineer-chanpu.blog\/wp-content\/uploads\/2023\/10\/^-1024x633.jpg\" alt=\"\" class=\"wp-image-4711\" style=\"aspect-ratio:1.617693522906793;width:697px;height:auto\" srcset=\"https:\/\/engineer-chanpu.blog\/wp-content\/uploads\/2023\/10\/^-1024x633.jpg 1024w, https:\/\/engineer-chanpu.blog\/wp-content\/uploads\/2023\/10\/^-300x185.jpg 300w, https:\/\/engineer-chanpu.blog\/wp-content\/uploads\/2023\/10\/^-768x474.jpg 768w, https:\/\/engineer-chanpu.blog\/wp-content\/uploads\/2023\/10\/^-1536x949.jpg 1536w, https:\/\/engineer-chanpu.blog\/wp-content\/uploads\/2023\/10\/^.jpg 1622w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">What is the difference from Azure context?<\/h2>\n\n\n\n<p>&#8220;\ucee8\ud14d\uc2a4\ud2b8(context)&#8221;\ub294 \uc5ec\ub7ec \ud658\uacbd \ub610\ub294 \uad6c\uc131 \uac04\uc5d0 \uc804\ud658\ud558\ub294 \uba54\ucee4\ub2c8\uc998\uc744 \uc81c\uacf5\ud558\ub294\ub370 \uc0ac\uc6a9\ub418\ub294 \uc6a9\uc5b4\uc785\ub2c8\ub2e4. <br>Kubernetes\uc640 Azure \ubaa8\ub450 &#8220;\ucee8\ud14d\uc2a4\ud2b8&#8221;\ub77c\ub294 \uac1c\ub150\uc744 \uc0ac\uc6a9\ud558\uc9c0\ub9cc, <mark style=\"background-color:#000000\" class=\"has-inline-color has-luminous-vivid-amber-color\">\ub458\uc758 \uc6a9\ub3c4\uc640 \uc0ac\uc6a9 \ubc29\ubc95\uc740 \uc11c\ub85c \ub2e4\ub985\ub2c8\ub2e4. <\/mark><br>\uc544\ub798\uc5d0\uc11c \ub450 \ucee8\ud14d\uc2a4\ud2b8\ub97c \ube44\uad50\ud569\ub2c8\ub2e4:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Kubernetes Context<\/h3>\n\n\n\n<p><strong>\uc6a9\ub3c4<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Kubernetes\uc758 <code>kubectl<\/code> \ub3c4\uad6c\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc5ec\ub7ec <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">\ud074\ub7ec\uc2a4\ud130, \uc0ac\uc6a9\uc790, \ub124\uc784\uc2a4\ud398\uc774\uc2a4 \uac04\uc5d0 \uc804\ud658<\/mark>\ud560 \ub54c \uc0ac\uc6a9\ub429\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<p><strong>\uad6c\uc131 \uc694\uc18c<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Cluster<\/strong>: API \uc11c\ubc84\uc758 \uc8fc\uc18c\uc640 \uc778\uc99d \uc815\ubcf4\ub97c \ud3ec\ud568\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>User<\/strong>: \uc0ac\uc6a9\uc790 \uc778\uc99d \uc815\ubcf4 (\uc608: client certificates, bearer tokens)\ub97c \ud3ec\ud568\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>Namespace<\/strong>: \uae30\ubcf8\uc801\uc73c\ub85c <code>kubectl<\/code> \uba85\ub839\uc774 \uc601\ud5a5\uc744 \ubc1b\ub294 \ub124\uc784\uc2a4\ud398\uc774\uc2a4\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<p><strong>\uc800\uc7a5 \uc704\uce58<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\uc8fc\ub85c <code>~\/.kube\/config<\/code> \ud30c\uc77c\uc5d0 \uc800\uc7a5\ub429\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<p><strong>\uc8fc\uc694 \uba85\ub839<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>kubectl config get-contexts<\/code>: \uc0ac\uc6a9 \uac00\ub2a5\ud55c \ucee8\ud14d\uc2a4\ud2b8 \ubaa9\ub85d \ud45c\uc2dc<\/li>\n\n\n\n<li><code>kubectl config use-context [CONTEXT_NAME]<\/code>: \ud2b9\uc815 \ucee8\ud14d\uc2a4\ud2b8 \uc0ac\uc6a9 \uc124\uc815<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Azure Context (Azure CLI&#8217;s az account)<\/h3>\n\n\n\n<p><strong>\uc6a9\ub3c4<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Azure CLI (<code>az<\/code>) \ub3c4\uad6c\ub97c \uc0ac\uc6a9\ud558\uc5ec <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">\uc5ec\ub7ec Azure \uad6c\ub3c5 \ub610\ub294 \uacc4\uc815 \uac04\uc5d0 \uc804\ud658<\/mark>\ud560 \ub54c \uc0ac\uc6a9\ub429\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<p><strong>\uad6c\uc131 \uc694\uc18c<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Subscription ID<\/strong>: \uc791\uc5c5\uc744 \uc218\ud589\ud558\ub824\ub294 Azure \uad6c\ub3c5\uc758 ID\uc785\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>Tenant ID<\/strong>: Azure Active Directory \ud14c\ub10c\ud2b8\uc758 ID\uc785\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>User<\/strong>: Azure \uacc4\uc815\uc758 \uc0ac\uc6a9\uc790 \uc815\ubcf4\uc785\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<p><strong>\uc800\uc7a5 \uc704\uce58<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Azure CLI\uac00 \uc0ac\uc6a9\ud558\ub294 \uc778\uc99d \ubc0f \ud504\ub85c\ud30c\uc77c \uc815\ubcf4\ub97c \uc800\uc7a5\ud558\ub294 \uc704\uce58\uc5d0 \uc800\uc7a5\ub429\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<p><strong>\uc8fc\uc694 \uba85\ub839<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>az account list<\/code>: \uc0ac\uc6a9 \uac00\ub2a5\ud55c Azure \uad6c\ub3c5 \ubaa9\ub85d \ud45c\uc2dc<\/li>\n\n\n\n<li><code>az account set --subscription [SUBSCRIPTION_ID]<\/code>: \ud2b9\uc815 \uad6c\ub3c5 \uc0ac\uc6a9 \uc124\uc815<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\ub450 &#8220;\ucee8\ud14d\uc2a4\ud2b8&#8221; \ubaa8\ub450 \uc5ec\ub7ec \ud658\uacbd \uac04\uc758 \uc804\ud658\uc744 \uc6a9\uc774\ud558\uac8c \ud558\uae30 \uc704\ud55c \uba54\ucee4\ub2c8\uc998<\/li>\n\n\n\n<li>Kubernetes\ub294 \ud074\ub7ec\uc2a4\ud130 \uae30\ubc18\uc758 \ud658\uacbd \uc804\ud658\uc5d0 \ucd08\uc810<\/li>\n\n\n\n<li>Azure\ub294 \ud074\ub77c\uc6b0\ub4dc \ub9ac\uc18c\uc2a4 \uad00\ub9ac\uc5d0 \ub300\ud55c \uacc4\uc815 \ubc0f \uad6c\ub3c5 \uc804\ud658\uc5d0 \ucd08\uc810<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Kubernetes Cluster Concept &#8220;\ud074\ub7ec\uc2a4\ud130&#8221;\ub294 \ucef4\ud4e8\ud130 \ub124\ud2b8\uc6cc\ud0b9 \ubc0f \ubd84\uc0b0 \uc2dc\uc2a4\ud15c\uc758 \uc601\uc5ed\uc5d0\uc11c \uc5ec\ub7ec \ub300\uc758 \ucef4\ud4e8\ud130 \ub610\ub294 \uc11c\ubc84\uac00 \ubaa8\uc5ec \ud558\ub098\uc758 \ub2e8\uc77c \uc2dc\uc2a4\ud15c\ucc98\ub7fc \uc791\ub3d9\ud558\ub294 \uad6c\uc131\uc744 \uc758\ubbf8\ud569\ub2c8\ub2e4. \ud074\ub7ec\uc2a4\ud130\ub294 \uace0\uac00\uc6a9\uc131, \ubd80\ud558 \ubd84\uc0b0, \ud655\uc7a5\uc131 \ub4f1\uc758 \uc774\uc810\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. &#8230;<\/p>\n","protected":false},"author":1,"featured_media":6248,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"[{\"content\":\"Note: What is context?\",\"id\":\"8438f83f-25a7-4da6-a4e2-b61da4d01a62\"}]"},"categories":[226,33],"tags":[129],"class_list":["post-4689","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kubernetes","category-tech-notes","tag-kubernetes"],"_links":{"self":[{"href":"https:\/\/engineer-chanpu.blog\/index.php?rest_route=\/wp\/v2\/posts\/4689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/engineer-chanpu.blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/engineer-chanpu.blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/engineer-chanpu.blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/engineer-chanpu.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4689"}],"version-history":[{"count":17,"href":"https:\/\/engineer-chanpu.blog\/index.php?rest_route=\/wp\/v2\/posts\/4689\/revisions"}],"predecessor-version":[{"id":6249,"href":"https:\/\/engineer-chanpu.blog\/index.php?rest_route=\/wp\/v2\/posts\/4689\/revisions\/6249"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/engineer-chanpu.blog\/index.php?rest_route=\/wp\/v2\/media\/6248"}],"wp:attachment":[{"href":"https:\/\/engineer-chanpu.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/engineer-chanpu.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4689"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/engineer-chanpu.blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}