This page serves two purposes:
The above heading is an H2. The page title renders as an H1. The following sections show H3-H6.
This is in an H3 section.
This is in an H4 section.
This is in an H5 section.
This is in an H6 section.
Inline elements show up within the text of paragraph, list item, admonition, or other block-level element.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
monospace text
monospace bold
Markdown doesn’t have strict rules about how to process lists. When we moved from Jekyll to Hugo, we broke some lists. To fix them, keep the following in mind:
Make sure you indent sub-list items 4 spaces rather than the 2 that you may be used to. Counter-intuitively, you need to indent block-level content within a list item an extra 4 spaces too.
To end a list and start another, you need a HTML comment block on a new line between the lists, flush with the left-hand border. The first list won’t end otherwise, no matter how many blank lines you put between it and the second.
-
and *
Bullet lists can have paragraphs or block elements within them.
Indent the content to be one tab stop beyond the text of the bullet
point. This paragraph and the code block line up with the second l
in
Bullet
above.
ls -l
A bullet list item can contain a numbered list.
Note: For single-digit numbered lists, using two spaces after the period makes interior block-level content line up better along tab-stops.
Numbered lists can have paragraphs or block elements within them.
Just indent the content to be one tab stop beyond the text of the bullet
point. This paragraph and the code block line up with the m
in
Numbered
above.
ls -l
Tab lists can be used to conditionally display content, e.g., when multiple options must be documented that require distinct instructions or context.
Please select an option.
Tabs may also nest formatting styles.
Lists
echo 'Tab lists may contain code blocks!'
Nested header tags may also be included.
Warning: Headers within tab lists will not appear in the Table of Contents.
Checklists are technically bullet lists, but the bullets are suppressed by CSS.
You can create code blocks two different ways by surrounding the code block with three back-tick characters on lines before and after the code block. Only use back-ticks (code fences) for code blocks. This allows you to specify the language of the enclosed code, which enables syntax highlighting. It is also more predictable than using indentation.
Warning: There is one situation where you need to use indentation for code blocks: when the contents of the code block contain lines starting with-
or*
characters. This is due to blackfriday issue #239.
this is a code block created by back-ticks
The back-tick method has some advantages.
To specify the language for the code block, put it directly after the first grouping of back-ticks:
ls -l
Common languages used in Kubernetes documentation code blocks include:
bash
/ shell
(both work the same)go
json
yaml
xml
none
(disables syntax highlighting for the block)To show raw Hugo shortcodes as in the above example and prevent Hugo
from interpreting them, use C-style comments directly after the <
and before
the >
characters. The following example illustrates this (view the Markdown
source for this page).
{{< codenew file="pods/storage/gce-volume.yaml" >}}
To format a link, put the link text inside square brackets, followed by the link target in parentheses. Link to Kubernetes.io or Relative link to Kubernetes.io
You can also use HTML, but it is not preferred. Link to Kubernetes.io
To format an image, use similar syntax to links, but add a leading !
character. The square brackets contain the image’s alt text. Try to always use
alt text so that people using screen readers can get some benefit from the
image.
To specify extended attributes, such as width, title, caption, etc, use the
figure shortcode,
which is preferred to using a HTML <img>
tag. Also, if you need the image to
also be a hyperlink, use the link
attribute, rather than wrapping the whole
figure in Markdown link syntax as shown below.
Even if you choose not to use the figure shortcode, an image can also be a link. This time the pencil icon links to the Kubernetes website. Outer square brackets enclose the entire image tag, and the link target is in the parentheses at the end.
You can also use HTML for images, but it is not preferred.
Simple tables have one row per line, and columns are separated by |
characters. The header is separated from the body by cells containing nothing
but at least three -
characters. For ease of maintenance, try to keep all the
cell separators even, even if you heed to use extra space.
Heading cell 1 | Heading cell 2 |
---|---|
Body cell 1 | Body cell 2 |
The header is optional. Any text separated by |
will render as a table.
Markdown tables have a hard time with block-level elements within cells, such as list items, code blocks, or multiple paragraphs. For complex or very wide tables, use HTML instead.
Heading cell 1 | Heading cell 2 |
---|---|
Body cell 1 | Body cell 2 |
Sidebars and admonitions provide ways to add visual importance to text. Use them sparingly.
A sidebar offsets text visually, but without the visual prominence of admonitions.
This is a sidebar.
You can have paragraphs and block-level elements within a sidebar.
You can even have code blocks.
sudo dmesg
Admonitions (notes, warnings, etc) use Hugo shortcodes.
Note:Notes catch the reader’s attention without a sense of urgency.
You can have multiple paragraphs and block-level elements inside an admonition.
| Or | a | table |
Caution: The reader should proceed with caution.
Warning: Warnings point out something that could cause harm if ignored.
To add shortcodes to includes.
Note: You need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. If you do not already have a cluster, you can create one by using Minikube, or you can use one of these Kubernetes playgrounds:
Was this page helpful?
Thanks for the feedback. If you have a specific, answerable question about how to use Kubernetes, ask it on Stack Overflow. Open an issue in the GitHub repo if you want to report a problem or suggest an improvement.