commit
d95a938e68
|
@ -9,7 +9,7 @@ track: "USERS › APPLICATION DEVELOPER › FOUNDATIONAL"
|
|||
---
|
||||
|
||||
{% capture overview %}
|
||||
If you're a developer looking to run applications on Kubernetes, this page and its linked topics can help you get started with the fundamentals. Though this page primarily describes development workflows, [the subsequent page in the series](/docs/home/?path=users&persona=app-developer&level=intermediate){:target="_blank"} cover more advanced, production setups.
|
||||
If you're a developer looking to run applications on Kubernetes, this page and its linked topics can help you get started with the fundamentals. Though this page primarily describes development workflows, [the subsequent page in the series](/docs/home/?path=users&persona=app-developer&level=intermediate){:target="_blank"} covers more advanced, production setups.
|
||||
|
||||
{: .note }
|
||||
**A quick note**<br>This app developer "user journey" is *not* a comprehensive overview of Kubernetes. It focuses more on *what* you develop, test, and deploy to Kubernetes, rather than *how* the underlying infrastructure works.<br><br>Though it's possible for a single person to manage both, in many organizations, it’s common to assign the latter to a dedicated {% glossary_tooltip text="cluster operator" term_id="cluster-operator" %}.
|
||||
|
@ -20,7 +20,7 @@ If you're a developer looking to run applications on Kubernetes, this page and i
|
|||
{% capture body %}
|
||||
## Get started with a cluster
|
||||
|
||||
#### Web-based Environment
|
||||
#### Web-based environment
|
||||
|
||||
If you're brand new to Kubernetes and simply want to experiment without setting up a full development environment, *web-based environments* are a good place to start:
|
||||
|
||||
|
@ -32,7 +32,7 @@ If you're brand new to Kubernetes and simply want to experiment without setting
|
|||
* [Play with Kubernetes](http://labs.play-with-k8s.com/){:target="_blank"} - A less structured environment than the *Katacoda* playground, for those who are more comfortable with Kubernetes concepts and want to explore further. It supports the ability to spin up multiple nodes.
|
||||
|
||||
|
||||
#### Minikube (Recommended)
|
||||
#### Minikube (recommended)
|
||||
|
||||
Web-based environments are easy to access, but are not persistent. If you want to continue exploring Kubernetes in a workspace that you can come back to and change, *Minikube* is a good option.
|
||||
|
||||
|
@ -54,12 +54,12 @@ You can get basic information about your cluster with the commands `kubectl clus
|
|||
|
||||
## Deploy an application
|
||||
|
||||
#### Basic Workloads
|
||||
#### Basic workloads
|
||||
|
||||
The following examples demonstrate the fundamentals of deploying Kubernetes apps:
|
||||
* **Stateless Apps**: [Deploy a simple nginx server](/docs/tasks/run-application/run-stateless-application-deployment/){:target="_blank"}.
|
||||
* **Stateless apps**: [Deploy a simple nginx server](/docs/tasks/run-application/run-stateless-application-deployment/){:target="_blank"}.
|
||||
|
||||
* **Stateful Apps**: [Deploy a MySQL database](/docs/tasks/run-application/run-single-instance-stateful-application/){:target="_blank"}.
|
||||
* **Stateful apps**: [Deploy a MySQL database](/docs/tasks/run-application/run-single-instance-stateful-application/){:target="_blank"}.
|
||||
|
||||
Through these deployment tasks, you'll gain familiarity with the following:
|
||||
* General concepts
|
||||
|
@ -156,13 +156,13 @@ If you're not running Kubernetes or a similar automated system, you might find t
|
|||
|
||||
This process can be tedious and also inconvenient, especially if (2) happens in the early hours of the morning!
|
||||
|
||||
**If you have Kubernetes set up, however, manual intervention is not as necessary.** The Kubernetes [control plane](/docs/concepts/overview/components/#master-components){:target="_blank"}, which runs on your cluster's master node, will gracefully handle (3) and (4) on your behalf. As a a result, Kubernetes is often referred to as a *self-healing* system.
|
||||
**If you have Kubernetes set up, however, manual intervention is not as necessary.** The Kubernetes [control plane](/docs/concepts/overview/components/#master-components){:target="_blank"}, which runs on your cluster's master node, gracefully handles (3) and (4) on your behalf. As a a result, Kubernetes is often referred to as a *self-healing* system.
|
||||
|
||||
There are two key parts of the control plane that facilitate this behavior: the *Kubernetes API server* and the *Controllers*.
|
||||
|
||||
#### Kubernetes API Server
|
||||
#### Kubernetes API server
|
||||
|
||||
For Kubernetes to be useful, it needs to know *what* sort of cluster state you want it to maintain. Your YAML of JSON *configuration files* declare this desired state in terms of one or more API objects, such as {% glossary_tooltip text="Deployments" term_id="deployment" %}. To make updates to your cluster's state, you submit these files to the {% glossary_tooltip text="Kubernetes API" term_id="kubernetes-api" %} server (`kube-apiserver`).
|
||||
For Kubernetes to be useful, it needs to know *what* sort of cluster state you want it to maintain. Your YAML or JSON *configuration files* declare this desired state in terms of one or more API objects, such as {% glossary_tooltip text="Deployments" term_id="deployment" %}. To make updates to your cluster's state, you submit these files to the {% glossary_tooltip text="Kubernetes API" term_id="kubernetes-api" %} server (`kube-apiserver`).
|
||||
|
||||
Examples of state include but are not limited to the following:
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ As your Kubernetes use cases become more complex, you may find it helpful to fam
|
|||
|
||||
The following API objects provide functionality for additional workload types, whether they are *persistent* or *terminating*.
|
||||
|
||||
#### Persistent Workloads
|
||||
#### Persistent workloads
|
||||
|
||||
Like Deployments, these API objects run indefinitely on a cluster until they are manually terminated. They are best for long-running applications.
|
||||
|
||||
|
@ -47,7 +47,7 @@ Like Deployments, these API objects run indefinitely on a cluster until they are
|
|||
| **When a Pod dies** | Reschedule on *any* node, with new name `example-a51z` | Reschedule on same node, as `example-0` |
|
||||
| **When a node becomes unreachable** | Pod(s) are scheduled onto new node, with new names | Pod(s) are marked as "Unknown", and aren't rescheduled unless the Node object is forcefully deleted |
|
||||
|
||||
In practice, this means that StatefulSets are best suited for scenarios where replicas (Pods) need to coordinate their workloads in a strongly consistent manner. Guaranteeing an identity for each Pod helps avoid [split brain](https://en.wikipedia.org/wiki/Split-brain_(computing)){:target="_blank"} side-effects in the case when a node becomes unreachable ([network partition](https://en.wikipedia.org/wiki/Network_partition){:target="_blank"}). This makes StatefulSets a great fit for distributed datastores like Cassandra or Elasticsearch.
|
||||
In practice, this means that StatefulSets are best suited for scenarios where replicas (Pods) need to coordinate their workloads in a strongly consistent manner. Guaranteeing an identity for each Pod helps avoid [split-brain](https://en.wikipedia.org/wiki/Split-brain_(computing)){:target="_blank"} side effects in the case when a node becomes unreachable ([network partition](https://en.wikipedia.org/wiki/Network_partition){:target="_blank"}). This makes StatefulSets a great fit for distributed datastores like Cassandra or Elasticsearch.
|
||||
|
||||
|
||||
* **{% glossary_tooltip text="DaemonSets" term_id="daemonset" %}** - DaemonSets run continuously on every node in your cluster, even as nodes are added or swapped in. This guarantee is particularly useful for setting up global behavior across your cluster, such as:
|
||||
|
@ -56,7 +56,7 @@ Like Deployments, these API objects run indefinitely on a cluster until they are
|
|||
* Network proxy or [service mesh](https://www.linux.com/news/whats-service-mesh-and-why-do-i-need-one){:target="_blank"}
|
||||
|
||||
|
||||
#### Terminating Workloads
|
||||
#### Terminating workloads
|
||||
|
||||
In contrast to Deployments, these API objects are finite. They stop once the specified number of Pods have completed successfully.
|
||||
|
||||
|
@ -64,7 +64,7 @@ In contrast to Deployments, these API objects are finite. They stop once the spe
|
|||
|
||||
* **{% glossary_tooltip text="CronJobs" term_id="cronjob" %}** - These are similar to Jobs, but allow you to schedule their execution for a specific time or for periodic recurrence. You might use CronJobs to send reminder emails or to run backup jobs. They are set up with a similar syntax as *crontab*.
|
||||
|
||||
#### Other Resources
|
||||
#### Other resources
|
||||
|
||||
For more info, you can check out [a list of additional Kubernetes resource types](/docs/reference/kubectl/overview/#resource-types){:target="_blank"} as well as the [API reference docs]({{ reference_docs_url }}){:target="_blank"}.
|
||||
|
||||
|
@ -72,7 +72,7 @@ There may be additional features not mentioned here that you may find useful, wh
|
|||
|
||||
## Deploy a production-ready workload
|
||||
|
||||
The beginner tutorials on this site, such as the [Guestbook app](/docs/tutorials/stateless-application/guestbook/){:target="_blank"}, are geared towards getting workloads up and running on your cluster. This prototyping is great for building your intuition around Kubernetes! However, in order to reliably and securely promote your workloads to production, you'll need to follow some additional best practices.
|
||||
The beginner tutorials on this site, such as the [Guestbook app](/docs/tutorials/stateless-application/guestbook/){:target="_blank"}, are geared towards getting workloads up and running on your cluster. This prototyping is great for building your intuition around Kubernetes! However, in order to reliably and securely promote your workloads to production, you need to follow some additional best practices.
|
||||
|
||||
#### Declarative configuration
|
||||
|
||||
|
|
Loading…
Reference in New Issue