{"id":3342,"date":"2024-02-10T20:01:50","date_gmt":"2024-02-10T20:01:50","guid":{"rendered":"https:\/\/code2deploy.com\/?p=3342"},"modified":"2024-02-20T20:12:17","modified_gmt":"2024-02-20T20:12:17","slug":"how-to-work-kubernetes","status":"publish","type":"post","link":"https:\/\/code2deploy.com\/blog\/how-to-work-kubernetes\/","title":{"rendered":"How to work Kubernetes"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Kubernetes (K8s) is an open-source container orchestration platform designed to automate the deployment, scaling, and management of containerized applications. Its workflow involves several key components and processes:<\/p>\n\n\n<p class=\"wp-block-paragraph\">Certainly! Let&#8217;s dive deeper into each step of the Kubernetes deployment workflow:<\/p>\n\n\n<ol class=\"wp-block-list\">\n<li><strong>User Deployment:<\/strong>\n<ul class=\"wp-block-list\">\n<li>The user creates a Kubernetes manifest file, typically written in YAML or JSON format, to define the desired state of the application.<\/li>\n\n\n<li>The manifest includes specifications for various Kubernetes resources, such as Pods, Deployments, Services, ConfigMaps, Secrets, and PersistentVolumes.<\/li>\n\n\n<li>The user specifies details such as container images, resource requirements (CPU and memory), networking settings, environment variables, and volumes for data persistence.<\/li>\n<\/ul>\n<\/li>\n\n\n<li><strong>Manifest Submission:<\/strong>\n<ul class=\"wp-block-list\">\n<li>The user submits the manifest file to the Kubernetes API server, which is the primary management point for the Kubernetes cluster.<\/li>\n\n\n<li>This can be done using the <code>kubectl apply -f &lt;manifest-file&gt;<\/code> command or through API calls to the Kubernetes API server.<\/li>\n\n\n<li>The API server validates the manifest file and processes the submitted configuration details.<\/li>\n<\/ul>\n<\/li>\n\n\n<li><strong>Storage in etcd:<\/strong>\n<ul class=\"wp-block-list\">\n<li>The API server stores the configuration details provided in the manifest file into etcd, which is a distributed key-value store.<\/li>\n\n\n<li>Etcd serves as the source of truth for the Kubernetes cluster&#8217;s state and configuration data.<\/li>\n\n\n<li>Configuration changes, such as deployments, services, and updates to existing resources, are persisted in etcd to maintain consistency across the cluster.<\/li>\n<\/ul>\n<\/li>\n\n\n<li><strong>Controller Manager:<\/strong>\n<ul class=\"wp-block-list\">\n<li>The Controller Manager is a Kubernetes control plane component responsible for managing various controllers that regulate the state of the cluster&#8217;s resources.<\/li>\n\n\n<li>Controllers include the ReplicaSet controller, Deployment controller, StatefulSet controller, DaemonSet controller, and others.<\/li>\n\n\n<li>When a new deployment is submitted or updates are made to existing resources, the Controller Manager detects changes in the desired state and initiates reconciliation processes.<\/li>\n\n\n<li>The Controller Manager ensures that the actual state of the cluster matches the desired state specified in the manifests.<\/li>\n<\/ul>\n<\/li>\n\n\n<li><strong>Kubelet Action:<\/strong>\n<ul class=\"wp-block-list\">\n<li>The Kubelet is an agent that runs on each worker node in the Kubernetes cluster.<\/li>\n\n\n<li>It communicates with the API server and receives instructions from the Controller Manager to manage containers&#8217; lifecycle on its node.<\/li>\n\n\n<li>Upon receiving instructions, the Kubelet interacts with the container runtime (e.g., Docker, containerd) to create, start, stop, or delete containers based on the desired state defined in the manifests.<\/li>\n<\/ul>\n<\/li>\n\n\n<li><strong>Kube Proxy:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Kube Proxy is a network proxy that runs on each node in the Kubernetes cluster.<\/li>\n\n\n<li>It manages network connectivity and routing for pods within the cluster.<\/li>\n\n\n<li>Kube Proxy maintains network rules, such as iptables rules or IPVS rules, to enable pod-to-pod communication, load balancing, and service discovery.<\/li>\n\n\n<li>It ensures that incoming traffic is properly routed to the appropriate pods and that outgoing traffic from pods is appropriately handled.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n<p class=\"wp-block-paragraph\">By following these steps, Kubernetes automates the deployment and management of containerized applications, providing a scalable, resilient, and self-healing platform for modern application development and operations.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kubernetes (K8s) is an open-source container orchestration platform designed to automate the deployment, scaling, and management of containerized applications. Its workflow involves several key components and processes: Certainly! Let&#8217;s dive deeper into each step of the Kubernetes deployment workflow: By following these steps, Kubernetes automates the deployment and management of containerized applications, providing a scalable, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[124,123,3,126,125,9,122,13],"tags":[7,8,10,11,12,14,15],"class_list":["post-3342","post","type-post","status-publish","format-standard","hentry","category-aks-cluster","category-aws-eks-cluster","category-devops-tools","category-digital-ocean-k8s-cluster","category-gke-cluster","category-kubernetes","category-on-prem-cluster","category-orchestration-k8s","tag-docker","tag-k8s","tag-kubernetes","tag-kubernetes-deployment","tag-orchestration","tag-workflow","tag-yaml-manifest"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to work Kubernetes - code2deploy.com<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.code2deploy.com\/how-to-work-kubernetes\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to work Kubernetes - code2deploy.com\" \/>\n<meta property=\"og:description\" content=\"Kubernetes (K8s) is an open-source container orchestration platform designed to automate the deployment, scaling, and management of containerized applications. Its workflow involves several key components and processes: Certainly! Let&#8217;s dive deeper into each step of the Kubernetes deployment workflow: By following these steps, Kubernetes automates the deployment and management of containerized applications, providing a scalable, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.code2deploy.com\/how-to-work-kubernetes\/\" \/>\n<meta property=\"og:site_name\" content=\"code2deploy.com\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-10T20:01:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-20T20:12:17+00:00\" \/>\n<meta name=\"author\" content=\"enam\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"enam\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/how-to-work-kubernetes\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/how-to-work-kubernetes\\\/\"},\"author\":{\"name\":\"enam\",\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#\\\/schema\\\/person\\\/e46930c19b999a87f12566fa8357481b\"},\"headline\":\"How to work Kubernetes\",\"datePublished\":\"2024-02-10T20:01:50+00:00\",\"dateModified\":\"2024-02-20T20:12:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/how-to-work-kubernetes\\\/\"},\"wordCount\":463,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#\\\/schema\\\/person\\\/e46930c19b999a87f12566fa8357481b\"},\"keywords\":[\"docker\",\"k8s\",\"kubernetes\",\"Kubernetes deployment\",\"Orchestration\",\"workflow\",\"YAML Manifest\"],\"articleSection\":[\"AKS Cluster\",\"AWS EKS Cluster\",\"DevOps Tools\",\"Digital Ocean K8s Cluster\",\"GKE Cluster\",\"Kubernetes\",\"On-Prem Cluster\",\"Orchestration\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/blog.code2deploy.com\\\/how-to-work-kubernetes\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/how-to-work-kubernetes\\\/\",\"url\":\"https:\\\/\\\/blog.code2deploy.com\\\/how-to-work-kubernetes\\\/\",\"name\":\"How to work Kubernetes - code2deploy.com\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#website\"},\"datePublished\":\"2024-02-10T20:01:50+00:00\",\"dateModified\":\"2024-02-20T20:12:17+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/how-to-work-kubernetes\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blog.code2deploy.com\\\/how-to-work-kubernetes\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/how-to-work-kubernetes\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to work Kubernetes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/\",\"name\":\"code2deploy.com\\\/blog\",\"description\":\"TechOps\",\"publisher\":{\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#\\\/schema\\\/person\\\/e46930c19b999a87f12566fa8357481b\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#\\\/schema\\\/person\\\/e46930c19b999a87f12566fa8357481b\",\"name\":\"enam\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g\",\"caption\":\"enam\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g\"},\"sameAs\":[\"https:\\\/\\\/code2deploy.com\\\/blog\"],\"url\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/author\\\/enam\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to work Kubernetes - code2deploy.com","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.code2deploy.com\/how-to-work-kubernetes\/","og_locale":"en_US","og_type":"article","og_title":"How to work Kubernetes - code2deploy.com","og_description":"Kubernetes (K8s) is an open-source container orchestration platform designed to automate the deployment, scaling, and management of containerized applications. Its workflow involves several key components and processes: Certainly! Let&#8217;s dive deeper into each step of the Kubernetes deployment workflow: By following these steps, Kubernetes automates the deployment and management of containerized applications, providing a scalable, [&hellip;]","og_url":"https:\/\/blog.code2deploy.com\/how-to-work-kubernetes\/","og_site_name":"code2deploy.com","article_published_time":"2024-02-10T20:01:50+00:00","article_modified_time":"2024-02-20T20:12:17+00:00","author":"enam","twitter_card":"summary_large_image","twitter_misc":{"Written by":"enam","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.code2deploy.com\/how-to-work-kubernetes\/#article","isPartOf":{"@id":"https:\/\/blog.code2deploy.com\/how-to-work-kubernetes\/"},"author":{"name":"enam","@id":"https:\/\/code2deploy.com\/blog\/#\/schema\/person\/e46930c19b999a87f12566fa8357481b"},"headline":"How to work Kubernetes","datePublished":"2024-02-10T20:01:50+00:00","dateModified":"2024-02-20T20:12:17+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.code2deploy.com\/how-to-work-kubernetes\/"},"wordCount":463,"commentCount":0,"publisher":{"@id":"https:\/\/code2deploy.com\/blog\/#\/schema\/person\/e46930c19b999a87f12566fa8357481b"},"keywords":["docker","k8s","kubernetes","Kubernetes deployment","Orchestration","workflow","YAML Manifest"],"articleSection":["AKS Cluster","AWS EKS Cluster","DevOps Tools","Digital Ocean K8s Cluster","GKE Cluster","Kubernetes","On-Prem Cluster","Orchestration"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.code2deploy.com\/how-to-work-kubernetes\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.code2deploy.com\/how-to-work-kubernetes\/","url":"https:\/\/blog.code2deploy.com\/how-to-work-kubernetes\/","name":"How to work Kubernetes - code2deploy.com","isPartOf":{"@id":"https:\/\/code2deploy.com\/blog\/#website"},"datePublished":"2024-02-10T20:01:50+00:00","dateModified":"2024-02-20T20:12:17+00:00","breadcrumb":{"@id":"https:\/\/blog.code2deploy.com\/how-to-work-kubernetes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.code2deploy.com\/how-to-work-kubernetes\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.code2deploy.com\/how-to-work-kubernetes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/code2deploy.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to work Kubernetes"}]},{"@type":"WebSite","@id":"https:\/\/code2deploy.com\/blog\/#website","url":"https:\/\/code2deploy.com\/blog\/","name":"code2deploy.com\/blog","description":"TechOps","publisher":{"@id":"https:\/\/code2deploy.com\/blog\/#\/schema\/person\/e46930c19b999a87f12566fa8357481b"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/code2deploy.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/code2deploy.com\/blog\/#\/schema\/person\/e46930c19b999a87f12566fa8357481b","name":"enam","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g","caption":"enam"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g"},"sameAs":["https:\/\/code2deploy.com\/blog"],"url":"https:\/\/code2deploy.com\/blog\/author\/enam\/"}]}},"_links":{"self":[{"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/posts\/3342","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/comments?post=3342"}],"version-history":[{"count":1,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/posts\/3342\/revisions"}],"predecessor-version":[{"id":3510,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/posts\/3342\/revisions\/3510"}],"wp:attachment":[{"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/media?parent=3342"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/categories?post=3342"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/tags?post=3342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}