|
| 1 | +--- |
| 2 | +reviewers: |
| 3 | +- bgrant0607 |
| 4 | +- mikedanese |
| 5 | +title: What is Kubernetes? |
| 6 | +content_template: templates/concept |
| 7 | +weight: 10 |
| 8 | +--- |
| 9 | + |
| 10 | +{{% capture overview %}} |
| 11 | +This page is an overview of Kubernetes. |
| 12 | +{{% /capture %}} |
| 13 | + |
| 14 | +{{% capture body %}} |
| 15 | +Kubernetes is a portable, extensible open-source platform for managing |
| 16 | +containerized workloads and services, that facilitates both |
| 17 | +declarative configuration and automation. It has a large, rapidly |
| 18 | +growing ecosystem. Kubernetes services, support, and tools are widely available. |
| 19 | + |
| 20 | +Google open-sourced the Kubernetes project in 2014. Kubernetes builds upon |
| 21 | +a [decade and a half of experience that Google has with running |
| 22 | +production workloads at |
| 23 | +scale](https://research.google.com/pubs/pub43438.html), combined with |
| 24 | +best-of-breed ideas and practices from the community. |
| 25 | + |
| 26 | +## Why do I need Kubernetes and what can it do? |
| 27 | + |
| 28 | +Kubernetes has a number of features. It can be thought of as: |
| 29 | + |
| 30 | +- a container platform |
| 31 | +- a microservices platform |
| 32 | +- a portable cloud platform |
| 33 | +and a lot more. |
| 34 | + |
| 35 | +Kubernetes provides a **container-centric** management environment. It |
| 36 | +orchestrates computing, networking, and storage infrastructure on |
| 37 | +behalf of user workloads. This provides much of the simplicity of |
| 38 | +Platform as a Service (PaaS) with the flexibility of Infrastructure as |
| 39 | +a Service (IaaS), and enables portability across infrastructure |
| 40 | +providers. |
| 41 | + |
| 42 | +## How is Kubernetes a platform? |
| 43 | + |
| 44 | +Even though Kubernetes provides a lot of functionality, there are |
| 45 | +always new scenarios that would benefit from new |
| 46 | +features. Application-specific workflows can be streamlined to |
| 47 | +accelerate developer velocity. Ad hoc orchestration that is acceptable |
| 48 | +initially often requires robust automation at scale. This is why |
| 49 | +Kubernetes was also designed to serve as a platform for building an |
| 50 | +ecosystem of components and tools to make it easier to deploy, scale, |
| 51 | +and manage applications. |
| 52 | + |
| 53 | +[Labels](/docs/concepts/overview/working-with-objects/labels/) empower |
| 54 | +users to organize their resources however they |
| 55 | +please. [Annotations](/docs/concepts/overview/working-with-objects/annotations/) |
| 56 | +enable users to decorate resources with custom information to |
| 57 | +facilitate their workflows and provide an easy way for management |
| 58 | +tools to checkpoint state. |
| 59 | + |
| 60 | +Additionally, the [Kubernetes control |
| 61 | +plane](/docs/concepts/overview/components/) is built upon the same |
| 62 | +[APIs](/docs/reference/using-api/api-overview/) that are available to developers |
| 63 | +and users. Users can write their own controllers, such as |
| 64 | +[schedulers](https://github.com/kubernetes/community/blob/{{< param "githubbranch" >}}/contributors/devel/scheduler.md), |
| 65 | +with [their own |
| 66 | +APIs](/docs/concepts/api-extension/custom-resources/) |
| 67 | +that can be targeted by a general-purpose [command-line |
| 68 | +tool](/docs/user-guide/kubectl-overview/). |
| 69 | + |
| 70 | +This |
| 71 | +[design](https://git.k8s.io/community/contributors/design-proposals/architecture/architecture.md) |
| 72 | +has enabled a number of other systems to build atop Kubernetes. |
| 73 | + |
| 74 | +## What Kubernetes is not |
| 75 | + |
| 76 | +Kubernetes is not a traditional, all-inclusive PaaS (Platform as a |
| 77 | +Service) system. Since Kubernetes operates at the container level |
| 78 | +rather than at the hardware level, it provides some generally |
| 79 | +applicable features common to PaaS offerings, such as deployment, |
| 80 | +scaling, load balancing, logging, and monitoring. However, Kubernetes |
| 81 | +is not monolithic, and these default solutions are optional and |
| 82 | +pluggable. Kubernetes provides the building blocks for building developer |
| 83 | +platforms, but preserves user choice and flexibility where it is |
| 84 | +important. |
| 85 | + |
| 86 | +Kubernetes: |
| 87 | + |
| 88 | +* Does not limit the types of applications supported. Kubernetes aims |
| 89 | + to support an extremely diverse variety of workloads, including |
| 90 | + stateless, stateful, and data-processing workloads. If an |
| 91 | + application can run in a container, it should run great on |
| 92 | + Kubernetes. |
| 93 | +* Does not deploy source code and does not build your |
| 94 | + application. Continuous Integration, Delivery, and Deployment |
| 95 | + (CI/CD) workflows are determined by organization cultures and preferences |
| 96 | + as well as technical requirements. |
| 97 | +* Does not provide application-level services, such as middleware |
| 98 | + (e.g., message buses), data-processing frameworks (for example, |
| 99 | + Spark), databases (e.g., mysql), caches, nor cluster storage systems (e.g., |
| 100 | + Ceph) as built-in services. Such components can run on Kubernetes, and/or |
| 101 | + can be accessed by applications running on Kubernetes through portable |
| 102 | + mechanisms, such as the Open Service Broker. |
| 103 | +* Does not dictate logging, monitoring, or alerting solutions. It provides |
| 104 | + some integrations as proof of concept, and mechanisms to collect and |
| 105 | + export metrics. |
| 106 | +* Does not provide nor mandate a configuration language/system (e.g., |
| 107 | + [jsonnet](https://github.com/google/jsonnet)). It provides a declarative |
| 108 | + API that may be targeted by arbitrary forms of declarative specifications. |
| 109 | +* Does not provide nor adopt any comprehensive machine configuration, |
| 110 | + maintenance, management, or self-healing systems. |
| 111 | + |
| 112 | +Additionally, Kubernetes is not a mere *orchestration system*. In |
| 113 | +fact, it eliminates the need for orchestration. The technical |
| 114 | +definition of *orchestration* is execution of a defined workflow: |
| 115 | +first do A, then B, then C. In contrast, Kubernetes is comprised of a |
| 116 | +set of independent, composable control processes that continuously |
| 117 | +drive the current state towards the provided desired state. It |
| 118 | +shouldn't matter how you get from A to C. Centralized control is also |
| 119 | +not required. This results in a system that is easier to use and more |
| 120 | +powerful, robust, resilient, and extensible. |
| 121 | + |
| 122 | +## Why containers? |
| 123 | + |
| 124 | +Looking for reasons why you should be using containers? |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | +The *Old Way* to deploy applications was to install the applications |
| 129 | +on a host using the operating-system package manager. This had the |
| 130 | +disadvantage of entangling the applications' executables, |
| 131 | +configuration, libraries, and lifecycles with each other and with the |
| 132 | +host OS. One could build immutable virtual-machine images in order to |
| 133 | +achieve predictable rollouts and rollbacks, but VMs are heavyweight |
| 134 | +and non-portable. |
| 135 | + |
| 136 | +The *New Way* is to deploy containers based on operating-system-level |
| 137 | +virtualization rather than hardware virtualization. These containers |
| 138 | +are isolated from each other and from the host: they have their own |
| 139 | +filesystems, they can't see each others' processes, and their |
| 140 | +computational resource usage can be bounded. They are easier to build |
| 141 | +than VMs, and because they are decoupled from the underlying |
| 142 | +infrastructure and from the host filesystem, they are portable across |
| 143 | +clouds and OS distributions. |
| 144 | + |
| 145 | +Because containers are small and fast, one application can be packed |
| 146 | +in each container image. This one-to-one application-to-image |
| 147 | +relationship unlocks the full benefits of containers. With containers, |
| 148 | +immutable container images can be created at build/release time rather |
| 149 | +than deployment time, since each application doesn't need to be |
| 150 | +composed with the rest of the application stack, nor married to the |
| 151 | +production infrastructure environment. Generating container images at |
| 152 | +build/release time enables a consistent environment to be carried from |
| 153 | +development into production. Similarly, containers are vastly more |
| 154 | +transparent than VMs, which facilitates monitoring and |
| 155 | +management. This is especially true when the containers' process |
| 156 | +lifecycles are managed by the infrastructure rather than hidden by a |
| 157 | +process supervisor inside the container. Finally, with a single |
| 158 | +application per container, managing the containers becomes tantamount |
| 159 | +to managing deployment of the application. |
| 160 | + |
| 161 | +Summary of container benefits: |
| 162 | + |
| 163 | +* **Agile application creation and deployment**: |
| 164 | + Increased ease and efficiency of container image creation compared to VM image use. |
| 165 | +* **Continuous development, integration, and deployment**: |
| 166 | + Provides for reliable and frequent container image build and |
| 167 | + deployment with quick and easy rollbacks (due to image |
| 168 | + immutability). |
| 169 | +* **Dev and Ops separation of concerns**: |
| 170 | + Create application container images at build/release time rather |
| 171 | + than deployment time, thereby decoupling applications from |
| 172 | + infrastructure. |
| 173 | +* **Observability** |
| 174 | + Not only surfaces OS-level information and metrics, but also application |
| 175 | + health and other signals. |
| 176 | +* **Environmental consistency across development, testing, and production**: |
| 177 | + Runs the same on a laptop as it does in the cloud. |
| 178 | +* **Cloud and OS distribution portability**: |
| 179 | + Runs on Ubuntu, RHEL, CoreOS, on-prem, Google Kubernetes Engine, and anywhere else. |
| 180 | +* **Application-centric management**: |
| 181 | + Raises the level of abstraction from running an OS on virtual |
| 182 | + hardware to running an application on an OS using logical resources. |
| 183 | +* **Loosely coupled, distributed, elastic, liberated [micro-services](https://martinfowler.com/articles/microservices.html)**: |
| 184 | + Applications are broken into smaller, independent pieces and can |
| 185 | + be deployed and managed dynamically -- not a fat monolithic stack |
| 186 | + running on one big single-purpose machine. |
| 187 | +* **Resource isolation**: |
| 188 | + Predictable application performance. |
| 189 | +* **Resource utilization**: |
| 190 | + High efficiency and density. |
| 191 | + |
| 192 | +## What does Kubernetes mean? K8s? |
| 193 | + |
| 194 | +The name **Kubernetes** originates from Greek, meaning *helmsman* or |
| 195 | +*pilot*, and is the root of *governor* and |
| 196 | +[cybernetic](http://www.etymonline.com/index.php?term=cybernetics). *K8s* |
| 197 | +is an abbreviation derived by replacing the 8 letters "ubernete" with |
| 198 | +"8". |
| 199 | + |
| 200 | +{{% /capture %}} |
| 201 | + |
| 202 | +{{% capture whatsnext %}} |
| 203 | +* Ready to [Get Started](/docs/setup/)? |
| 204 | +* For more details, see the [Kubernetes Documentation](/docs/home/). |
| 205 | +{{% /capture %}} |
| 206 | + |
| 207 | + |
0 commit comments