{"id":14532,"date":"2023-06-28T15:45:34","date_gmt":"2023-06-28T08:45:34","guid":{"rendered":"https:\/\/gcloudvn.com\/?p=14532"},"modified":"2023-08-16T11:45:31","modified_gmt":"2023-08-16T04:45:31","slug":"cach-lam-viec-cung-kubernetes-namespaces","status":"publish","type":"post","link":"https:\/\/gcloudvn.com\/en\/kienthuc\/cach-lam-viec-cung-kubernetes-namespaces\/","title":{"rendered":"How to work with Kubernetes Namespaces"},"content":{"rendered":"<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">In this short article, we will learn about it <strong>Kubernetes Namespaces<\/strong>, explains what they are and how to create them on the command line and in the configuration file, with some quick reference command examples using kubectl<\/span><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/gcloudvn.com\/en\/kienthuc\/cach-lam-viec-cung-kubernetes-namespaces\/#Kubernetes_Namespaces_la_gi\" >What are Kubernetes Namespaces?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/gcloudvn.com\/en\/kienthuc\/cach-lam-viec-cung-kubernetes-namespaces\/#Lam_viec_voi_Kubernetes_Namespace_bang_kubectl\" >Working with Kubernetes Namespace using kubectl<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/gcloudvn.com\/en\/kienthuc\/cach-lam-viec-cung-kubernetes-namespaces\/#Tao_namespace_bang_tep_cau_hinh_YAML\" >Create a namespace with a YAML configuration file\u00a0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/gcloudvn.com\/en\/kienthuc\/cach-lam-viec-cung-kubernetes-namespaces\/#Tong_ket\" >In conclusion\u00a0<\/a><\/li><\/ul><\/nav><\/div>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Kubernetes_Namespaces_la_gi\"><\/span><b>What are Kubernetes Namespaces?<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Namespaces in Kubernetes allow objects to be grouped. Namespaces can be used for logical grouping, such as to represent multiple environments such as dev, qa, or prod, or to group the objects that make up an application.\u00a0<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Usually, a combination of both examples above is used. For example, if an application is called blog, it can be segmented using the blog-dev, blog-qa, and blog-prod namespaces. Namespaces can be created with the kubectl command line tool or using a YAML configuration file.\u00a0<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">The Kubernetes documentation describes the namespaces:<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">In Kubernetes, namespaces provide a mechanism for isolating groups of resources within a single cluster. The name of the resource needs to be unique within a namespace, but not between namespaces. Namespace-based scoping applies only to named objects (e.g. Deployment, Service, etc.) and not to cluster-wide objects (e.g. StorageClass, Nodes, PersistentVolume, etc.) . If a resource is placed in a namespace, it means it cannot be created without a namespace.<\/span><\/p>\n<p><em><strong>&gt; Reference:<\/strong> <a href=\"https:\/\/gcloudvn.com\/en\/google-kubernetes-engine-gke\/\">Google Kubernetes Engine (GKE) system<\/a><\/em><\/p>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Lam_viec_voi_Kubernetes_Namespace_bang_kubectl\"><\/span><b>Working with Kubernetes Namespace using kubectl<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Note that on the command line, if a namespace is not specified for a given kubectl command, objects from the default namespace are displayed.\u00a0<\/span><\/p>\n<ol style=\"text-align: justify;\">\n<li><span style=\"font-weight: 400;\"> View available namespaces.\u00a0<\/span><\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">To view objects in a particular namespace, the name of the namespace must be specified. Creating objects in the default namespace is considered a bad practice because it becomes more difficult to implement NetworkPolicies, use RBAC, and isolate objects.\u00a0<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14533\" src=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-1.jpg\" alt=\"How to work with Kubernetes Namespaces 1\" width=\"600\" height=\"55\" srcset=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-1.jpg 800w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-1-768x70.jpg 768w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-1-18x2.jpg 18w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/>Here we have a listed namespace named ingress-nginx.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14549 size-full\" src=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-2.jpg\" alt=\"How to work with Kubernetes Namespaces 2\" width=\"600\" height=\"407\" srcset=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-2.jpg 600w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-2-18x12.jpg 18w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/>Notice that we also see four Kubernetes namespaces appear:\u00a0<\/span><\/p>\n<ul style=\"text-align: justify;\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">default \u2014 the default namespace set by the system.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">kube-system \u2014 This namespace is assigned to resources created by the Kubernetes system.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">kube-public \u2014 this namespace is generated by the system and visible to all users, even unauthenticated users. .\u200d<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">kube-node-lease \u2014 This namespace contains the tenants associated with each node. These leases allow the kubelet to send beats so you can determine node availability.<\/span><\/li>\n<\/ul>\n<ol style=\"text-align: justify;\" start=\"2\">\n<li><span style=\"font-weight: 400;\"> Lists the pods contained in a namespace.\u00a0<\/span><\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">To view the pods in the namespace:<\/span><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14548\" src=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-3.jpg\" alt=\"How to work with Kubernetes Namespaces 3\" width=\"600\" height=\"114\" srcset=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-3.jpg 800w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-3-768x146.jpg 768w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-3-18x3.jpg 18w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14547\" src=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-4.jpg\" alt=\"How to work with Kubernetes Namespaces 4\" width=\"600\" height=\"65\" srcset=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-4.jpg 800w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-4-768x83.jpg 768w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-4-18x2.jpg 18w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<ol style=\"text-align: justify;\" start=\"3\">\n<li><span style=\"font-weight: 400;\"> List pods in the default namespace.\u00a0<\/span><\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">To view the pods in the default namespace (without specifying a namespace):<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14546\" src=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-5.jpg\" alt=\"How to work with Kubernetes Namespaces 5\" width=\"600\" height=\"56\" srcset=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-5.jpg 800w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-5-768x71.jpg 768w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-5-18x2.jpg 18w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14545\" src=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-6.jpg\" alt=\"How to work with Kubernetes Namespaces 6\" width=\"600\" height=\"203\" srcset=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-6.jpg 800w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-6-768x259.jpg 768w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-6-18x6.jpg 18w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Note that the three pods in the ingress-nginx namespace are not shown here.\u00a0<\/span><\/p>\n<ol style=\"text-align: justify;\" start=\"4\">\n<li><span style=\"font-weight: 400;\"> Create a new namespace.\u00a0<\/span><\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">To create a new namespace:<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14544\" src=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-7.jpg\" alt=\"How to work with Kubernetes Namespaces 7\" width=\"600\" height=\"57\" srcset=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-7.jpg 800w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-7-768x73.jpg 768w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-7-18x2.jpg 18w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14543\" src=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-8.jpg\" alt=\"How to work with Kubernetes Namespaces 8\" width=\"600\" height=\"43\" srcset=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-8.jpg 800w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-8-768x55.jpg 768w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-8-18x1.jpg 18w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/>Namespace names can be created with a maximum length of 63 characters using only alphanumeric characters and hyphens. Names cannot begin with a hyphen, and characters can only be lowercase.\u00a0<\/span><\/p>\n<ol style=\"text-align: justify;\" start=\"5\">\n<li><span style=\"font-weight: 400;\"> Delete a namespace.\u00a0<\/span><\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">And to delete a namespace:<\/span><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14542\" src=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-9.jpg\" alt=\"How to work with Kubernetes Namespaces 9\" width=\"600\" height=\"53\" srcset=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-9.jpg 800w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-9-768x68.jpg 768w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-9-18x2.jpg 18w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14540 size-full\" src=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-10.jpg\" alt=\"How to work with Kubernetes Namespaces 10\" width=\"600\" height=\"43\" srcset=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-10.jpg 600w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-10-18x1.jpg 18w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<ol style=\"text-align: justify;\" start=\"6\">\n<li><span style=\"font-weight: 400;\"> View detailed information about a namespace.\u00a0<\/span><\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">To view details about a namespace:<\/span><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14541\" src=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-11.jpg\" alt=\"How to work with Kubernetes Namespaces 11\" width=\"600\" height=\"56\" srcset=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-11.jpg 800w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-11-768x72.jpg 768w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-11-18x2.jpg 18w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14539 size-full\" src=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-12.jpg\" alt=\"How to work with Kubernetes Namespaces 12\" width=\"600\" height=\"221\" srcset=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-12.jpg 600w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-12-18x7.jpg 18w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<ol style=\"text-align: justify;\" start=\"7\">\n<li><span style=\"font-weight: 400;\">Displays resource usage of pods in a namespace.\u00a0<\/span><\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">To view resource usage (CPU\/Memory) of pods in a namespace:<\/span><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14538 size-full\" src=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-13.jpg\" alt=\"How to work with Kubernetes Namespaces 13\" width=\"600\" height=\"56\" srcset=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-13.jpg 600w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-13-18x2.jpg 18w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14537 size-full\" src=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-14.jpg\" alt=\"How to work with Kubernetes Namespaces 14\" width=\"600\" height=\"71\" srcset=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-14.jpg 600w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-14-18x2.jpg 18w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Tao_namespace_bang_tep_cau_hinh_YAML\"><\/span><b>Create a namespace with a YAML configuration file\u00a0<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Create a namespace in the YAML configuration defined as in the example below:<\/span><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14536\" src=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-15.jpg\" alt=\"How to work with Kubernetes Namespaces 15\" width=\"600\" height=\"113\" srcset=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-15.jpg 800w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-15-768x144.jpg 768w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-15-18x3.jpg 18w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14535\" src=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-16.jpg\" alt=\"How to work with Kubernetes Namespaces 16\" width=\"600\" height=\"58\" srcset=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-16.jpg 800w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-16-768x74.jpg 768w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-16-18x2.jpg 18w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14534 size-full\" src=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-17.jpg\" alt=\"How to work with Kubernetes Namespaces 17\" width=\"600\" height=\"52\" srcset=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-17.jpg 600w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/kubernetes-namespaces-17-18x2.jpg 18w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Tong_ket\"><\/span><b>In conclusion\u00a0<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\"><strong>Namespaces are easy to work with with Kubernetes<\/strong> and can be manipulated using the kubectl command line tool or declared in a YAML configuration file. They allow for logical separation and organization of resource groups. Effective use of namespaces can help make cluster management more streamlined.\u00a0<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Also, anything that can be run through kubectl can be run in Spacelift. Spacelift helps you manage complex compliance and compliance challenges using Kubernetes. It brings with it the GitOps flow. So your Kubernetes Deployment is synchronized with your Kubernetes Stack and the pull requests will show you a preview of what they are intended to change. It also has a wide selection of policies, allowing you to automate compliance checks and build complex workflows.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Through this article, we can see that Cloud has been and is an inevitable trend in the technology development and optimization system of enterprises. Gimasys - Google&#039;s Premier Partner in Vietnam is a provider and consultant on the structure and design of the optimal Cloud solution for you. For technical support, you can contact Gimasys \u2013 Premier Partner of Google in Vietnam at the following information:<\/span><\/p>\n<ul style=\"text-align: justify;\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Hotline: <\/b><span style=\"font-weight: 400;\">0974 417 099 (HCM) | 0987 682 505 (HN)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Email: <\/b><span style=\"font-weight: 400;\">gcp@gimasys.com<\/span><\/li>\n<\/ul>\n<p style=\"text-align: right;\"><b>Source: Gimasys<\/b><\/p>","protected":false},"excerpt":{"rendered":"<p>Trong b\u00e0i vi\u1ebft ng\u1eafn n\u00e0y, ch\u00fang ta s\u1ebd c\u00f9ng t\u00ecm hi\u1ec3u v\u1ec1 Kubernetes Namespaces, gi\u1ea3i th\u00edch ch\u00fang l\u00e0 g\u00ec v\u00e0 c\u00e1ch t\u1ea1o ch\u00fang tr\u00ean d\u00f2ng l\u1ec7nh v\u00e0 trong t\u1ec7p c\u1ea5u h\u00ecnh, v\u1edbi m\u1ed9t s\u1ed1 v\u00ed d\u1ee5 l\u1ec7nh tham kh\u1ea3o nhanh&hellip;<\/p>","protected":false},"author":2,"featured_media":14550,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1,135],"tags":[],"class_list":["post-14532","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kienthuc","category-google-cloud-platform","entry","has-media"],"_links":{"self":[{"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/posts\/14532","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/comments?post=14532"}],"version-history":[{"count":0,"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/posts\/14532\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/media\/14550"}],"wp:attachment":[{"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/media?parent=14532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/categories?post=14532"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/tags?post=14532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}