{"id":20717,"date":"2021-11-12T18:42:03","date_gmt":"2021-11-12T13:12:03","guid":{"rendered":"http:\/\/ismiletechnologies.com\/?p=20717"},"modified":"2021-12-16T16:51:38","modified_gmt":"2021-12-16T11:21:38","slug":"ultimate-guide-to-google-kubernetes-engine","status":"publish","type":"post","link":"https:\/\/ismiletechnologies.com\/en_us\/technology\/ultimate-guide-to-google-kubernetes-engine\/","title":{"rendered":"Ultimate Guide to Google Kubernetes Engine"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"20717\" class=\"elementor elementor-20717\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-5cba804 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"5cba804\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-2b3eec9\" data-id=\"2b3eec9\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-28fd73e elementor-widget elementor-widget-text-editor\" data-id=\"28fd73e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p><span class=\"TextRun SCXW138128369 BCX0\" lang=\"EN\" xml:lang=\"EN\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW138128369 BCX0\">This blog, will help you understand how Kubernetes Engine works and how it helps deploy applications in cloud containers.\u00a0<\/span><\/span><span class=\"EOP SCXW138128369 BCX0\" data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a45ff89 elementor-widget elementor-widget-heading\" data-id=\"a45ff89\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">What is Kubernetes Engines?  <\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7471864 elementor-widget elementor-widget-text-editor\" data-id=\"7471864\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p><span class=\"TextRun SCXW88714553 BCX0\" lang=\"EN\" xml:lang=\"EN\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW88714553 BCX0\">Kubernetes allows you to move work from one <a href=\"http:\/\/ismiletechnologies.com\/cloud-services\/\"><span style=\"color: #333399;\">cloud service<\/span><\/a> provider to another with minimal effort from a not super technical perspective. It enables rapid application development and iteration by simplifying the deployment, updating, and management of applications and services. And the resources used to build Kubernetes Engine clusters come from Compute Engine.<\/span><\/span><span class=\"EOP SCXW88714553 BCX0\" data-ccp-props=\"{\">\u00a0<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-dce623f elementor-widget elementor-widget-image\" data-id=\"dce623f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"624\" height=\"360\" src=\"https:\/\/ismiletechnologies.com\/wp-content\/uploads\/2021\/11\/image-13.png\" class=\"attachment-full size-full wp-image-20720\" alt=\"\" srcset=\"https:\/\/ismiletechnologies.com\/wp-content\/uploads\/2021\/11\/image-13.png 624w, https:\/\/ismiletechnologies.com\/wp-content\/uploads\/2021\/11\/image-13-300x173.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f57379d elementor-widget elementor-widget-heading\" data-id=\"f57379d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">The components of Kubernetes <\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-485979e elementor-widget elementor-widget-text-editor\" data-id=\"485979e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p><span class=\"TextRun SCXW157625684 BCX0\" lang=\"EN\" xml:lang=\"EN\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW157625684 BCX0\">When you deploy Kubernetes, you get a cluster. A Kubernetes cluster consists of work machines (called nodes) that run containerized applications. Each cluster has at least one worker node. A group of one or more containers is called a pod. Containers in a pod are deployed together. They start, stop, and replicate as a group.<\/span><span class=\"NormalTextRun SCXW157625684 BCX0\">\u00a0<\/span><\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4a5316d elementor-widget elementor-widget-image\" data-id=\"4a5316d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"624\" height=\"292\" src=\"https:\/\/ismiletechnologies.com\/wp-content\/uploads\/2021\/11\/image-14.png\" class=\"attachment-full size-full wp-image-20721\" alt=\"\" srcset=\"https:\/\/ismiletechnologies.com\/wp-content\/uploads\/2021\/11\/image-14.png 624w, https:\/\/ismiletechnologies.com\/wp-content\/uploads\/2021\/11\/image-14-300x140.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ac2bc24 elementor-widget elementor-widget-heading\" data-id=\"ac2bc24\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">So let\u2019s start learning how to configure a Kubernetes cluster in the Kubernetes Engine.<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-de54c7f elementor-widget elementor-widget-text-editor\" data-id=\"de54c7f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p aria-level=\"1\"><span data-contrast=\"auto\">Below are the steps<\/span><span data-contrast=\"auto\">\u00a0we can follow to create a Google Kubernetes Engine cluster containing several containers, in an example of each containing a web server.\u00a0<\/span><span data-ccp-props=\"{\">\u00a0<\/span><\/p><p><span style=\"text-decoration: underline;\"><span style=\"color: #000000; text-decoration: underline;\">Step1. Confirm that needed APIs are enabled\u00a0<\/span><\/span><\/p><p><span data-contrast=\"auto\">1. In the <a href=\"http:\/\/ismiletechnologies.com\/google-cloud-platform\/\"><span style=\"color: #333399;\">GCP<\/span><\/a> Console, on the Navigation menu (<\/span><span data-contrast=\"auto\">), click\u00a0APIs &amp; Services.<\/span><span data-ccp-props=\"{\"> <br \/><\/span><span data-ccp-props=\"{\">2. <\/span><span data-contrast=\"auto\">Scroll down in the list of enabled APIs, and confirm that both of these APIs are enabled:<\/span><span data-ccp-props=\"{\">\u00a0<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a33d8e5 elementor-widget elementor-widget-text-editor\" data-id=\"a33d8e5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<ul style=\"font-weight: 400;\">\n<li data-leveltext=\"\u25cf\" data-font=\"Roboto\" data-listid=\"5\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Kubernetes Engine API<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:2160,&quot;335559740&quot;:384}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"\u25cf\" data-font=\"Roboto\" data-listid=\"5\" aria-setsize=\"-1\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">Container Registry API<\/span><\/li>\n<\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-06b683a elementor-widget elementor-widget-text-editor\" data-id=\"06b683a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p aria-level=\"2\"><span style=\"color: #000000;\"><span style=\"text-decoration: underline;\">Step2. Start a Kubernetes Engine cluster\u00a0<\/span> <\/span><\/p><p aria-level=\"2\">1. Access to <a href=\"http:\/\/ismiletechnologies.com\/cloud-services\/\"><span style=\"color: #333399;\">Cloud<\/span><\/a> Shell<\/p><p aria-level=\"2\"><span data-contrast=\"auto\">2. Place the zone that you want to work on\u00a0<br \/><\/span><span style=\"color: #000000;\">export MY_ZONE=us-central1-a\u00a0\u00a0<\/span><\/p><p aria-level=\"2\"><span data-contrast=\"auto\">3. Start a Kubernetes cluster managed by Kubernetes Engine. Name the clusterwebfrontendand configure it to run 2 nodes: <\/span><span data-ccp-props=\"{\">\u00a0<br \/><\/span><span style=\"color: #000000;\">gcloud\u00a0container clusters create\u00a0webfrontend\u00a0&#8211;zone $MY_ZONE &#8211;num-nodes 2\u00a0\u00a0<\/span><\/p><p aria-level=\"2\"><span data-contrast=\"auto\">4. After the cluster is created, check your installed version of Kubernetes using thekubectlversion command: <\/span><span data-ccp-props=\"{\">\u00a0<br \/><\/span><span style=\"color: #000000;\">kubectl\u00a0version\u00a0\u00a0<\/span><\/p><p aria-level=\"2\">5. click Compute Engine &gt; VM Instances. Your Kubernetes cluster is now ready for use.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8f74f44 elementor-widget elementor-widget-text-editor\" data-id=\"8f74f44\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p aria-level=\"2\"><span style=\"text-decoration: underline;\"><span style=\"color: #000000; text-decoration: underline;\">Step3. Run and deploy a container\u00a0\u00a0<\/span><\/span><\/p>\n<p aria-level=\"2\"><span data-contrast=\"none\">1. From your Cloud Shell prompt, launch a single instance of thenginxcontainer. (Nginx is a popular web server.) <\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:276}\">\u00a0<br \/><\/span><span style=\"color: #000000;\">kubectl\u00a0create deploy\u00a0nginx\u00a0&#8211;image=nginx:1.17.10\u00a0\u00a0<\/span><\/p>\n<p aria-level=\"2\"><span data-contrast=\"none\">2. View the pod running thenginxcontainer:kubectl get pods <\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p aria-level=\"2\"><span data-contrast=\"none\">3. Expose thenginxcontainer to the Internet: <\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:276}\">\u00a0<br \/><\/span><span style=\"color: #000000;\">kubectl\u00a0expose deployment\u00a0nginx\u00a0&#8211;port 80 &#8211;type\u00a0LoadBalancer\u00a0\u00a0<\/span><\/p>\n<p aria-level=\"2\"><span data-contrast=\"none\">4. View the new service:kubectlget services <\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p aria-level=\"2\">5. Open a new web browser tab and paste your cluster&#8217;s external IP address into the address bar.\u00a0<\/p>\n<p aria-level=\"2\">6. Scale up the number of pods running on your service:\u00a0<br \/><span style=\"color: #000000;\">kubectl\u00a0scale deployment\u00a0nginx\u00a0&#8211;replicas 3\u00a0\u00a0<\/span><\/p>\n<p aria-level=\"2\">7. Confirm that Kubernetes has updated the number of pods:\u00a0<br \/><span style=\"color: #000000;\">kubectl\u00a0get pods\u00a0\u00a0<\/span><\/p>\n<p aria-level=\"2\">8. Confirm that your external IP address has not changed:\u00a0<br \/><span style=\"color: #000000;\">kubectl\u00a0get service\u00a0\u00a0<\/span><\/p>\n<p aria-level=\"2\"><span data-contrast=\"none\">9. Return to the web browser tab where you viewed your cluster&#8217;s external IP address. Refresh the page to confirm that thenginxweb server is still responding. <\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"none\"><br \/>By the finish the above steps: Provision a <\/span><span style=\"color: #333399;\"><a style=\"color: #333399;\" href=\"http:\/\/kubernetes.io\/\">Kubernetes<\/a><\/span><span data-contrast=\"none\"><span style=\"color: #333399;\">\u00a0<\/span>cluster using\u00a0<\/span><span style=\"color: #333399;\"><a style=\"color: #333399;\" href=\"https:\/\/cloud.google.com\/container-engine\">Kubernetes Engine.<\/a><\/span><span data-contrast=\"none\">\u00a0Deploy and manage Docker containers using\u00a0kubectl.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>This blog, will help you understand how Kubernetes Engine works and how it helps deploy applications in cloud containers.\u00a0\u00a0 What is Kubernetes Engines? Kubernetes allows you to move work from one cloud service provider to another with minimal effort from a not super technical perspective. It enables rapid application development and iteration by simplifying the [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":21180,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-20717","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/posts\/20717","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/comments?post=20717"}],"version-history":[{"count":15,"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/posts\/20717\/revisions"}],"predecessor-version":[{"id":22158,"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/posts\/20717\/revisions\/22158"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/media\/21180"}],"wp:attachment":[{"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/media?parent=20717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/categories?post=20717"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/tags?post=20717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}