{"id":3120,"date":"2021-03-19T13:31:21","date_gmt":"2021-03-19T18:31:21","guid":{"rendered":"https:\/\/microsoftgeek.com\/?p=3120"},"modified":"2021-03-19T13:31:21","modified_gmt":"2021-03-19T18:31:21","slug":"kubernetes-k8s-overview","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=3120","title":{"rendered":"Kubernetes (K8s) Overview"},"content":{"rendered":"\n<p><img decoding=\"async\" src=\"https:\/\/www.mirantis.com\/wp-content\/uploads\/2019\/03\/kubernetes-blog-mirantis-768x576.jpg\"><\/p>\n\n\n\n<p>Given the importance of Kubernetes in today\u2019s environment, we wanted to give you a \u201cone stop shop\u201d where you can learn any information you may need.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is Kubernetes?<\/h2>\n\n\n\n<p>Simply put, Kubernetes, or K8s, is a container orchestration system. In other words, when you use K8s, a container based application can be deployed, scaled, and managed automatically.<\/p>\n\n\n\n<p>The objective of\u00a0Kubernetes\u00a0container orchestration is to abstract away the complexity of managing a fleet of containers that represent packaged applications and include the code and everything needed to them them wherever they\u2019re provisioned. By interacting with the K8s REST API, users can describe the desired state of their applications, and K8s does whatever is necessary to make the infrastructure conform. It deploys groups of containers, replicates them, redeploys if some of them fail, and so on.<\/p>\n\n\n\n<p>Because it\u2019s open source, a K8s cluster can run almost anywhere, and the major public cloud providers all provide easy ways to consume this technology. Private clouds based on OpenStack can also run Kubernetes, and bare metal servers can be leveraged as worker nodes for it. So if you describe your application with K8s building blocks, you\u2019ll then be able to deploy it within VMs or bare metal servers, on public or private clouds.<\/p>\n\n\n\n<p>Let\u2019s take a look at the basics of how K8s works, so that you will have a solid foundation to dive deeper.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is a Kubernetes cluster? The Kubernetes architecture<\/h2>\n\n\n\n<p>The K8s architecture is relatively simple. You never interact directly with the nodes hosting your application, but only with the control plane, which presents an API and is in charge of scheduling and replicating groups of containers named Pods.&nbsp;<em>Kubectl<\/em>&nbsp;is the command line interface that allows you to interact with the API to share the desired application state or gather detailed information on the infrastructure\u2019s current state.<\/p>\n\n\n\n<p>Let\u2019s look at the various pieces.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Nodes<\/h3>\n\n\n\n<p>Each node that hosts part of your distributed application does so by leveraging\u00a0Docker\u00a0or a similar container technology, such as Rocket from\u00a0CoreOS. The nodes also run two additional pieces of software:\u00a0kube-proxy, which gives access to your running app, and\u00a0kubelet, which receives commands from the k8s control plane. Nodes can also run\u00a0flannel, an\u00a0etcd\u00a0backed network fabric for containers.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Master<\/h3>\n\n\n\n<p>The control plane itself runs the API server (kube-apiserver), the scheduler (kube-scheduler), the controller manager (kube-controller-manager) and\u00a0etcd, a highly available key-value store for shared configuration and service discovery implementing the\u00a0Raft\u00a0consensus Algorithm.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.mirantis.com\/wp-content\/uploads\/2020\/10\/k8s-arch.png\" alt=\"diagram of Kubernetes architecture\" class=\"wp-image-674938\"\/><\/figure><\/div>\n\n\n\n<p>Now let\u2019s look at some of the terminology you might run into.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Terminology<\/h3>\n\n\n\n<p>K8s has its own vocabulary which, once you get used to it, gives you some sense of how things are organized. These terms include:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"http:\/\/kubernetes.io\/docs\/user-guide\/pods\">Pods<\/a>: Pods are a group of one or more containers, their shared storage, and options about how to run them. Each pod gets its own IP address.<\/li><li><a href=\"http:\/\/kubernetes.io\/docs\/user-guide\/labels\">Labels<\/a>: Labels are key\/value pairs that Kubernetes attaches to any objects, such as pods, Replication Controllers, Endpoints, and so on.<\/li><li><a href=\"http:\/\/kubernetes.io\/docs\/user-guide\/annotations\">Annotations<\/a>: Annotations are key\/value pairs used to store arbitrary non-queryable metadata.<\/li><li><a href=\"http:\/\/kubernetes.io\/docs\/user-guide\/services\">Services<\/a>: Services are an abstraction, defining a logical set of Pods and a policy by which to access them over the network.<\/li><li><a href=\"http:\/\/kubernetes.io\/docs\/user-guide\/replication-controller\">Replication Controller<\/a>: Replication controllers ensure that a specific number of pod replicas are running at any one time.<\/li><li><a href=\"http:\/\/kubernetes.io\/docs\/user-guide\/secrets\">Secrets<\/a>: Secrets hold sensitive information such as passwords, TLS certificates, OAuth tokens, and ssh keys.<\/li><li><a href=\"http:\/\/kubernetes.io\/docs\/user-guide\/configmap\">ConfigMap<\/a>: ConfigMaps are mechanisms used to inject containers with configuration data while keeping containers agnostic of Kubernetes itself.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Why Kubernetes?<\/h3>\n\n\n\n<p>So what is K8s used for?&nbsp; In order to justify the added complexity that K8s brings, there need to be some benefits. At its core, a cluster manager such as k8s exists to serve developers so they can serve themselves without having to request support from the operations team.<\/p>\n\n\n\n<p>Reliability is one of the major benefits of K8s; Google has over 10 years of experience when it comes to infrastructure operations with Borg, their internal container orchestration solution, and they\u2019ve built K8s based on this experience. K8s can be used to prevent failure from impacting the availability or performance of your application, and that\u2019s a great benefit.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Given the importance of Kubernetes in today\u2019s environment, we wanted to give you a \u201cone stop shop\u201d where you can learn any information you may need. What is Kubernetes? Simply put, Kubernetes, or K8s, is a container orchestration system. In other words, when you use K8s, a container based application can be deployed, scaled, and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[77,79],"tags":[],"class_list":["post-3120","post","type-post","status-publish","format-standard","hentry","category-devops","category-kubernetes"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/3120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3120"}],"version-history":[{"count":1,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/3120\/revisions"}],"predecessor-version":[{"id":3121,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/3120\/revisions\/3121"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}