{"id":3378,"date":"2024-02-11T15:47:24","date_gmt":"2024-02-11T15:47:24","guid":{"rendered":"https:\/\/code2deploy.com\/?p=3378"},"modified":"2024-02-20T20:09:49","modified_gmt":"2024-02-20T20:09:49","slug":"how-to-kube-api-server-etcd-cluster-kub-scheduler-kublet-works","status":"publish","type":"post","link":"https:\/\/code2deploy.com\/blog\/how-to-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\/","title":{"rendered":"How to kube-API Server Works"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>User Interaction:<\/strong>\n<ul class=\"wp-block-list\">\n<li>The user interacts with Kubernetes through the kubectl command-line interface.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example:&nbsp;<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ kubectl get nodes &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>NAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; STATUS &nbsp; ROLES &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AGE&nbsp; &nbsp; VERSION<br>k8s-master &nbsp; &nbsp; Ready&nbsp; &nbsp; control-plane &nbsp; 146d &nbsp; v1.28.1<br>k8s-worker-1 &nbsp; Ready&nbsp; &nbsp; worker&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 146d &nbsp; v1.28.1<br>k8s-worker-2 &nbsp; Ready&nbsp; &nbsp; &lt;none&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 47d&nbsp; &nbsp; v1.28.1<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Authentication and Validation:<\/strong>\n<ul class=\"wp-block-list\">\n<li>The kube-API Server authenticates the user&#8217;s request and validates it to ensure compliance with Kubernetes API schemas and policies.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Data Retrieval from ETCD:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Upon validation, the kube-API Server retrieves data from the ETCD cluster, which acts as the persistent storage for Kubernetes cluster state.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Response to User:<\/strong>\n<ul class=\"wp-block-list\">\n<li>The kube-API Server responds to the user with the requested information or performs the requested operation (e.g., creating a pod).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>kube-Scheduler Assignment:<\/strong>\n<ul class=\"wp-block-list\">\n<li>If a user request involves creating a pod without specifying a node, the kube-Scheduler monitors the API-Server for new pod requests.<\/li>\n\n\n\n<li>It then assigns the appropriate node for the pod to run on based on scheduling policies.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Communication with Kubelet:<\/strong>\n<ul class=\"wp-block-list\">\n<li>The kube-API Server updates the ETCD cluster with information about the newly created pod and its assigned node.<\/li>\n\n\n\n<li>It then communicates this information to the kubelet running on the appropriate worker node.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>POD Creation by Kubelet:<\/strong>\n<ul class=\"wp-block-list\">\n<li>The kubelet on the worker node receives instructions to create the pod.<\/li>\n\n\n\n<li>It interacts with the container runtime engine (e.g., Docker) to deploy the application image and create the pod.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Status Update:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Once the pod is created and running, the kubelet updates the pod&#8217;s status in the ETCD cluster via the kube-API Server.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Continuous Process:<\/strong>\n<ul class=\"wp-block-list\">\n<li>This workflow repeats for every user request or cluster state change, ensuring consistency and proper management of the Kubernetes cluster.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Example:&nbsp; $ kubectl get nodes &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; STATUS &nbsp; ROLES &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AGE&nbsp; &nbsp; VERSIONk8s-master &nbsp; &nbsp; Ready&nbsp; &nbsp; control-plane [&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,126,125,115,9,122,13],"tags":[25,27,14],"class_list":["post-3378","post","type-post","status-publish","format-standard","hentry","category-aks-cluster","category-aws-eks-cluster","category-digital-ocean-k8s-cluster","category-gke-cluster","category-k8s-kubernetes","category-kubernetes","category-on-prem-cluster","category-orchestration-k8s","tag-cka","tag-devops","tag-workflow"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to kube-API Server Works - 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-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to kube-API Server Works - code2deploy.com\" \/>\n<meta property=\"og:description\" content=\"Example:&nbsp; $ kubectl get nodes &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; STATUS &nbsp; ROLES &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AGE&nbsp; &nbsp; VERSIONk8s-master &nbsp; &nbsp; Ready&nbsp; &nbsp; control-plane [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.code2deploy.com\/how-to-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\/\" \/>\n<meta property=\"og:site_name\" content=\"code2deploy.com\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-11T15:47:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-20T20:09:49+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-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/how-to-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\\\/\"},\"author\":{\"name\":\"enam\",\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#\\\/schema\\\/person\\\/e46930c19b999a87f12566fa8357481b\"},\"headline\":\"How to kube-API Server Works\",\"datePublished\":\"2024-02-11T15:47:24+00:00\",\"dateModified\":\"2024-02-20T20:09:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/how-to-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\\\/\"},\"wordCount\":338,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#\\\/schema\\\/person\\\/e46930c19b999a87f12566fa8357481b\"},\"keywords\":[\"CKA\",\"DevOps\",\"workflow\"],\"articleSection\":[\"AKS Cluster\",\"AWS EKS Cluster\",\"Digital Ocean K8s Cluster\",\"GKE Cluster\",\"K8s Kubernetes\",\"Kubernetes\",\"On-Prem Cluster\",\"Orchestration\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/blog.code2deploy.com\\\/how-to-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/how-to-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\\\/\",\"url\":\"https:\\\/\\\/blog.code2deploy.com\\\/how-to-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\\\/\",\"name\":\"How to kube-API Server Works - code2deploy.com\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#website\"},\"datePublished\":\"2024-02-11T15:47:24+00:00\",\"dateModified\":\"2024-02-20T20:09:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/how-to-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blog.code2deploy.com\\\/how-to-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/how-to-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to kube-API Server Works\"}]},{\"@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 kube-API Server Works - 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-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\/","og_locale":"en_US","og_type":"article","og_title":"How to kube-API Server Works - code2deploy.com","og_description":"Example:&nbsp; $ kubectl get nodes &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; STATUS &nbsp; ROLES &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AGE&nbsp; &nbsp; VERSIONk8s-master &nbsp; &nbsp; Ready&nbsp; &nbsp; control-plane [&hellip;]","og_url":"https:\/\/blog.code2deploy.com\/how-to-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\/","og_site_name":"code2deploy.com","article_published_time":"2024-02-11T15:47:24+00:00","article_modified_time":"2024-02-20T20:09:49+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-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\/#article","isPartOf":{"@id":"https:\/\/blog.code2deploy.com\/how-to-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\/"},"author":{"name":"enam","@id":"https:\/\/code2deploy.com\/blog\/#\/schema\/person\/e46930c19b999a87f12566fa8357481b"},"headline":"How to kube-API Server Works","datePublished":"2024-02-11T15:47:24+00:00","dateModified":"2024-02-20T20:09:49+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.code2deploy.com\/how-to-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\/"},"wordCount":338,"commentCount":0,"publisher":{"@id":"https:\/\/code2deploy.com\/blog\/#\/schema\/person\/e46930c19b999a87f12566fa8357481b"},"keywords":["CKA","DevOps","workflow"],"articleSection":["AKS Cluster","AWS EKS Cluster","Digital Ocean K8s Cluster","GKE Cluster","K8s Kubernetes","Kubernetes","On-Prem Cluster","Orchestration"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.code2deploy.com\/how-to-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.code2deploy.com\/how-to-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\/","url":"https:\/\/blog.code2deploy.com\/how-to-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\/","name":"How to kube-API Server Works - code2deploy.com","isPartOf":{"@id":"https:\/\/code2deploy.com\/blog\/#website"},"datePublished":"2024-02-11T15:47:24+00:00","dateModified":"2024-02-20T20:09:49+00:00","breadcrumb":{"@id":"https:\/\/blog.code2deploy.com\/how-to-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.code2deploy.com\/how-to-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.code2deploy.com\/how-to-kube-api-server-etcd-cluster-kub-scheduler-kublet-works\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/code2deploy.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to kube-API Server Works"}]},{"@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\/3378","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=3378"}],"version-history":[{"count":1,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/posts\/3378\/revisions"}],"predecessor-version":[{"id":3507,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/posts\/3378\/revisions\/3507"}],"wp:attachment":[{"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/media?parent=3378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/categories?post=3378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/tags?post=3378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}