{"id":14525,"date":"2023-06-28T11:06:55","date_gmt":"2023-06-28T04:06:55","guid":{"rendered":"https:\/\/gcloudvn.com\/?p=14525"},"modified":"2023-08-16T13:22:08","modified_gmt":"2023-08-16T06:22:08","slug":"nhung-luu-y-noi-bat-ve-kubernetes-service","status":"publish","type":"post","link":"https:\/\/gcloudvn.com\/en\/kienthuc\/nhung-luu-y-noi-bat-ve-kubernetes-service\/","title":{"rendered":"Outstanding notes about Kubernetes Service"},"content":{"rendered":"<p style=\"text-align: justify;\"><i><span style=\"font-weight: 400;\">Kubernetes l\u00e0 m\u1ed9t n\u1ec1n t\u1ea3ng m\u00e3 ngu\u1ed3n m\u1edf n\u1ed5i ti\u1ebfng \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 qu\u1ea3n l\u00fd v\u00e0 tri\u1ec3n khai c\u00e1c \u1ee9ng d\u1ee5ng trong c\u00e1c container tr\u00ean nhi\u1ec1u m\u00e1y ch\u1ee7 kh\u00e1c nhau. Service l\u00e0 m\u1ed9t trong nh\u1eefng \u0111\u1ed1i t\u01b0\u1ee3ng c\u01a1 b\u1ea3n trong Kubernetes \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 cung c\u1ea5p v\u00e0 qu\u1ea3n l\u00fd truy c\u1eadp \u0111\u1ebfn c\u00e1c \u1ee9ng d\u1ee5ng trong Kubernetes Cluster. V\u1eady <strong>Kubernetes Service<\/strong> c\u00f3 nh\u1eefng l\u01b0u \u00fd n\u1ed5i b\u1eadt n\u00e0o cho doanh nghi\u1ec7p khi l\u1ef1a ch\u1ecdn cho h\u1ec7 th\u1ed1ng.<\/span><\/i><\/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\/nhung-luu-y-noi-bat-ve-kubernetes-service\/#Kubernetes_Service_bao_gom_nhung_gi\" >What does Kubernetes Service include?<\/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\/nhung-luu-y-noi-bat-ve-kubernetes-service\/#Tai_sao_can_dung_den_Kubernetes_Service\" >Why use Kubernetes Service<\/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\/nhung-luu-y-noi-bat-ve-kubernetes-service\/#Cach_thuc_Kubernetes_Service_hoat_dong\" >How Kubernetes Service Works<\/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\/nhung-luu-y-noi-bat-ve-kubernetes-service\/#Ket_luan_tong_quan\" >Overall conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Kubernetes_Service_bao_gom_nhung_gi\"><\/span><b>What does Kubernetes Service include?<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\"><strong>Kubernetes Service<\/strong> l\u00e0 m\u1ed9t \u0111\u1ed1i t\u01b0\u1ee3ng quan tr\u1ecdng trong Kubernetes. N\u00f3 cho ph\u00e9p cung c\u1ea5p v\u00e0 qu\u1ea3n l\u00fd truy c\u1eadp v\u00e0o c\u00e1c \u1ee9ng d\u1ee5ng ch\u1ea1y tr\u00ean c\u00e1c container trong Kubernetes Cluster. Kubernetes Service bao g\u1ed3m nh\u1eefng y\u1ebfu t\u1ed1 sau:<\/span><\/p>\n<ul style=\"text-align: justify;\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Selectors:<\/b><span style=\"font-weight: 400;\"> This is a condition used to select specific Pods to bind to the Service.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Cluster IPs: <\/b><span style=\"font-weight: 400;\">The internal IP number of the Service on the Cluster, used to access the Service in the Cluster.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Type: <\/b><span style=\"font-weight: 400;\">There are three types of Service: ClusterIP, NodePort and LoadBalancer, each with different features in implementing access to applications in the Cluster.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Ports:<\/b><span style=\"font-weight: 400;\"> The service has one or more ports, each associated with a port on the containers in the pod.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Endpoints:<\/b><span style=\"font-weight: 400;\"> List of IPs and Ports of Pods making access to the Service, updated automatically when Pods are rotated or when Pods are added or removed.<\/span><\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Kubernetes Service plays an important role in managing access to applications in the Kubernetes Cluster. It simplifies the installation and network configuration of applications in containers and ensures the availability and reliability of applications.<\/span><\/p>\n<p><strong><em>&gt; Tham kh\u1ea3o <a href=\"https:\/\/gcloudvn.com\/en\/google-kubernetes-engine-gke\/\">h\u1ec7 th\u1ed1ng Google Kubernetes Engine<\/a><\/em><\/strong><\/p>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Tai_sao_can_dung_den_Kubernetes_Service\"><\/span><b>Why use Kubernetes Service<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Kubernetes Service is an important object in Kubernetes, it provides many benefits for managing applications running on containers in Kubernetes Cluster:<\/span><\/p>\n<ul style=\"text-align: justify;\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">A stable IP address: Helps ensure applications always have a stable IP address to make connections. When the applications running in the Pod are changed or deleted, the Kubernetes Service automatically updates the list of IP addresses of the remaining applications.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Application Integrity: Kubernetes Service helps ensure that connections sent to the correct application work in the Pod, thus minimizing the probability of failure.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Use networking: Kubernetes Service provides secure networking features such as load balancing, connectivity through network tools, traffic routing, and access rules mechanisms.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Access orchestration: Kubernetes Service allows for orchestration of access to applications in the same load pool or whitelisted location for more security.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Application Reusability: Kubernetes Service simplifies the process of deploying applications in containers, while also helping to reuse applications that have been deployed across multiple clusters.<\/span><\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">In short, using Kubernetes Service makes it easier and more efficient to manage access to applications in the Kubernetes Cluster, ensuring the availability and reliability of applications, and also more security.<\/span><\/p>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Cach_thuc_Kubernetes_Service_hoat_dong\"><\/span><b>How Kubernetes Service Works<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Kubernetes Service works on Pods containing containers deployed in Kubernetes Cluster.<\/span><\/p>\n<figure id=\"attachment_14526\" aria-describedby=\"caption-attachment-14526\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-14526\" src=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/1_40hZpAikFt5WHWOdbHYd5A.png\" alt=\"How Kubernetes Service Works\" width=\"600\" height=\"293\" srcset=\"https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/1_40hZpAikFt5WHWOdbHYd5A.png 451w, https:\/\/gcloudvn.com\/wp-content\/uploads\/2023\/06\/1_40hZpAikFt5WHWOdbHYd5A-18x9.png 18w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption id=\"caption-attachment-14526\" class=\"wp-caption-text\"><em>How Kubernetes Service Works<\/em><\/figcaption><\/figure>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">The operating steps of Kubernetes Service are as follows:<\/span><\/p>\n<ul style=\"text-align: justify;\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Create Pods:<\/b><span style=\"font-weight: 400;\"> First, the same priority containers are encapsulated in the Pod. Pods contain one or more containers, which interact with each other and make up the complete application.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Set Label: <\/b><span style=\"font-weight: 400;\">Each Pod has a unique label, which is used for identification and associated with a specific job number.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Declare the Kubernetes Service:<\/b><span style=\"font-weight: 400;\"> The administrator needs to declare a Service, declare a Selector to link Pods with the same label.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Cluster IPs: <\/b><span style=\"font-weight: 400;\">When the Service is declared, Kubernetes will generate an IP address associated with the Service. This IP address is called the Cluster IP and is only accessible from within the Cluster.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Endpoints: <\/b><span style=\"font-weight: 400;\">The Kubernetes Service will get a list of Pods that include a label that matches the Selector in the Service&#039;s declaration. The list of IP addresses and ports of these Pods is stored in the Endpoint.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><strong>BILLION<\/strong><b>Service ribbon:<\/b><span style=\"font-weight: 400;\"> Through Cluster IP, Kubernetes Service helps to coordinate application requests to respective Pods containing containers with associated labels.<\/span><\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">In conclusion, Kubernetes Service uses Pods to provide access to application containers in the Kubernetes Cluster. Kubernetes will identify the respective Pods using the Selector in the Service declaration and dispatch connections and requests to the applications deployed in the containers in the Pod.<\/span><\/p>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Ket_luan_tong_quan\"><\/span><b>Overall conclusion<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">V\u1edbi c\u00e1c l\u1ee3i \u00edch n\u00e0y, <strong>Kubernetes Services<\/strong> \u0111\u00e3 tr\u1edf th\u00e0nh m\u1ed9t c\u00f4ng c\u1ee5 ph\u1ed5 bi\u1ebfn v\u00e0 kh\u00f4ng th\u1ec3 thi\u1ebfu \u0111\u1ed1i v\u1edbi c\u00e1c h\u1ec7 th\u1ed1ng doanh nghi\u1ec7p ng\u00e0y nay.\u00a0<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">For more detailed product information or to need technical support, you can contact Gimasys - 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>Kubernetes l\u00e0 m\u1ed9t n\u1ec1n t\u1ea3ng m\u00e3 ngu\u1ed3n m\u1edf n\u1ed5i ti\u1ebfng \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 qu\u1ea3n l\u00fd v\u00e0 tri\u1ec3n khai c\u00e1c \u1ee9ng d\u1ee5ng trong c\u00e1c container tr\u00ean nhi\u1ec1u m\u00e1y ch\u1ee7 kh\u00e1c nhau. Service l\u00e0 m\u1ed9t trong nh\u1eefng \u0111\u1ed1i t\u01b0\u1ee3ng c\u01a1 b\u1ea3n&hellip;<\/p>","protected":false},"author":2,"featured_media":14527,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1,135],"tags":[],"class_list":["post-14525","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\/14525","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=14525"}],"version-history":[{"count":0,"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/posts\/14525\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/media\/14527"}],"wp:attachment":[{"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/media?parent=14525"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/categories?post=14525"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gcloudvn.com\/en\/wp-json\/wp\/v2\/tags?post=14525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}