Documentation Home

Documentation for using and learning about Kubernetes.

Edit This Page

Using Page Templates

These page templates are available for writers who would like to contribute new topics to the Kubernetes docs:

The page templates are in the _includes/templates directory of the kubernetes.github.io repository.

Task template

A task page shows how to do a single thing, typically by giving a short sequence of steps. Task pages have minimal explanation, but often provide links to conceptual topics that provide related background and knowledge.

To write a new task page, create a Markdown file in a subdirectory of the /docs/tasks directory. In your Markdown file, provide values for these variables:

Then include templates/task.md like this:
...
{% include templates/task.md %}

In the steps section, use ## to start with a level-two heading. For subheadings, use ### and #### as needed. Similarly, if you choose to have a discussion section, start the section with a level-two heading.

Here's an example of a Markdown file that uses the task template:

---
title: Configuring This Thing
---

{% capture overview %}
This page shows how to ...
{% endcapture %}

{% capture prerequisites %}
* Do this.
* Do this too.
{% endcapture %}

{% capture steps %}
## Doing ...

1. Do this.
1. Do this next. Possibly read this [related explanation](...).
{% endcapture %}

{% capture discussion %}
## Understanding ...

Here's an interesting thing to know about the steps you just did.
{% endcapture %}

{% capture whatsnext %}
* Learn more about [this](...).
* See this [related task](...).
{% endcapture %}

{% include templates/task.md %}

Here's an example of a published topic that uses the task template:

Using an HTTP Proxy to Access the Kubernetes API

Tutorial template

A tutorial page shows how to accomplish a goal that is larger than a single task. Typically a tutorial page has several sections, each of which has a sequence of steps. For example, a tutorial might provide a walkthrough of a code sample that illustrates a certain feature of Kubernetes. Tutorials can include surface-level explanations, but should link to related concept topics for deep explanations.

To write a new tutorial page, create a Markdown file in a subdirectory of the /docs/tutorials directory. In your Markdown file, provide values for these variables:

Then include templates/tutorial.md like this:
...
{% include templates/tutorial.md %}

In the lessoncontent section, use ## to start with a level-two heading. For subheadings, use ### and #### as needed.

Here's an example of a Markdown file that uses the tutorial template:

---
title: Running a Thing
---

{% capture overview %}
This page shows how to ...
{% endcapture %}

{% capture prerequisites %}
* Do this.
* Do this too.
{% endcapture %}

{% capture objectives %}
* Learn this.
* Build this.
* Run this.
{% endcapture %}

{% capture lessoncontent %}
## Building ...

1. Do this.
1. Do this next. Possibly read this [related explanation](...).

## Running ...

1. Do this.
1. Do this next.

## Understanding the code
Here's something interesting about the code you ran in the preceding steps.
{% endcapture %}

{% capture cleanup %}
* Delete this.
* Stop this.
{% endcapture %}

{% capture whatsnext %}
* Learn more about [this](...).
* See this [related tutorial](...).
{% endcapture %}

{% include templates/tutorial.md %}

Here's an example of a published topic that uses the tutorial template:

Running a Stateless Application Using a Deployment

Concept template

A concept page explains some aspect of Kubernetes. For example, a concept page might describe the Kubernetes Deployment object and explain the role it plays as an application is deployed, scaled, and updated. Typically, concept pages don't include sequences of steps, but instead provide links to tasks or tutorials.

To write a new concept page, create a Markdown file in a subdirectory of the /docs/concepts directory. In your Markdown file, provide values for these variables:

Then include templates/concept.md like this:
...
{% include templates/concept.md %}

In the body section, use ## to start with a level-two heading. For subheadings, use ### and #### as needed.

Here's an example of a page that uses the concept template:

---
title: Understanding this Thing
---

{% capture overview %}
This page explains ...
{% endcapture %}

{% capture body %}
## Understanding ...

Kubernetes provides ...

## Using ...

To use ...
{% endcapture %}

{% capture whatsnext %}
* Learn more about [this](...).
* See this [related task](...).
{% endcapture %}

{% include templates/concept.md %}

Here's an example of a published topic that uses the concept template:

Annotations

Analytics

Create an Issue Edit this Page