Skip to content

Commit cef1acc

Browse files
Merge branch 'master' into release-1.3
# Conflicts: # docs/admin/resourcequota/index.md # docs/admin/resourcequota/object-counts.yaml # docs/admin/resourcequota/walkthrough.md # docs/user-guide/downward-api/index.md
2 parents 660f53a + 8dc87a6 commit cef1acc

File tree

119 files changed

+3267
-790
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+3267
-790
lines changed

README.md

Lines changed: 45 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,48 @@ Welcome! We are very pleased you want to contribute to the documentation and/or
66

77
You can click the "Fork" button in the upper-right area of the screen to create a copy of our site on your GitHub account called a "fork." Make any changes you want in your fork, and when you are ready to send those changes to us, go to the index page for your fork and click "New Pull Request" to let us know about it.
88

9+
## Staging the site on GitHub Pages
10+
911
If you want to see your changes staged without having to install anything locally, remove the CNAME file in this directory and
1012
change the name of the fork to be:
1113

1214
YOUR_GITHUB_USERNAME.github.io
1315

14-
Then, visit: [http://YOUR_GITHUB_USERNAME.github.io](http://YOUR_GITHUB_USERNAME.github.io)
16+
Then make your changes.
1517

16-
You should see a special-to-you version of the site.
18+
When you visit [http://YOUR_GITHUB_USERNAME.github.io](http://YOUR_GITHUB_USERNAME.github.io) you should see a special-to-you version of the site that contains the changes you just made.
1719

18-
## Editing/staging the site locally
20+
## Staging the site locally (using Docker)
1921

20-
If you have files to upload, or just want to work offline, run the below commands to setup
21-
your environment for running GitHub pages locally. Then, any edits you make will be viewable
22-
on a lightweight webserver that runs on your local machine.
22+
Don't like installing stuff? Download and run a local staging server with a single `docker run` command.
23+
24+
git clone https://github.com/kubernetes/kubernetes.github.io.git
25+
cd kubernetes.github.io
26+
docker run -ti --rm -v "$PWD":/k8sdocs -p 4000:4000 johndmulhausen/k8sdocs
2327

24-
First install rvm
28+
Then visit [http://localhost:4000](http://localhost:4000) to see our site. Any changes you make on your local machine will be automatically staged.
2529

26-
curl -sSL https://get.rvm.io | bash -s stable
30+
If you're interested you can view [the Dockerfile for this image](https://gist.github.com/johndmulhausen/f8f0ab8d82d2c755af3a4709729e1859).
2731

28-
Then load it into your environment
32+
## Staging the site locally (from scratch setup)
2933

30-
source ${HOME}/.rvm/scripts/rvm (or whatever is prompted by the installer)
34+
The below commands to setup your environment for running GitHub pages locally. Then, any edits you make will be viewable
35+
on a lightweight webserver that runs on your local machine.
36+
37+
This will typically be the fastest way (by far) to iterate on docs changes and see them staged, once you get this set up, but it does involve several install steps that take awhile to complete, and makes system-wide modifications.
3138

32-
Then install Ruby 2.2 or higher
39+
Install Ruby 2.2 or higher. If you're on a Mac, follow [these instructions](https://gorails.com/setup/osx/). If you're on Linux, run these commands:
3340

34-
rvm install ruby-2.2.4
35-
rvm use ruby-2.2.4 --default
36-
37-
Verify that this new version is running (optional)
41+
apt-get install software-properties-common
42+
apt-add-repository ppa:brightbox/ruby-ng
43+
apt-get install ruby2.2
44+
apt-get install ruby2.2-dev
3845

39-
which ruby
40-
ruby -v
41-
42-
Install the GitHub Pages package, which includes Jekyll
46+
Install the GitHub Pages package, which includes Jekyll:
4347

4448
gem install github-pages
4549

46-
Clone our site
50+
Clone our site:
4751

4852
git clone https://github.com/kubernetes/kubernetes.github.io.git
4953

@@ -53,20 +57,21 @@ Make any changes you want. Then, to see your changes locally:
5357
jekyll serve
5458

5559
Your copy of the site will then be viewable at: [http://localhost:4000](http://localhost:4000)
56-
(or wherever Ruby tells you).
60+
(or wherever Jekyll tells you).
61+
62+
The above instructions work on Mac and Linux.
63+
[These instructions](https://martinbuberl.com/blog/setup-jekyll-on-windows-and-host-it-on-github-pages/) are for Windows users.
64+
65+
## GitHub help
5766

5867
If you're a bit rusty with git/GitHub, you might wanna read
5968
[this](http://readwrite.com/2013/10/02/github-for-beginners-part-2) for a refresher.
6069

61-
The above instructions work on Mac and Linux.
62-
[These instructions ](https://martinbuberl.com/blog/setup-jekyll-on-windows-and-host-it-on-github-pages/)
63-
might help for Windows users.
64-
6570
## Common Tasks
6671

6772
### Edit Page Titles or Change the Left Navigation
6873

69-
Edit the yaml files in `/_data/` for the Guides, Reference, Samples, or Support areas.
74+
Edit the yaml files in `/_data/` for the Guides, Reference, Samples, or Support areas.
7075

7176
You may have to exit and `jekyll clean` before restarting the `jekyll serve` to
7277
get changes to files in `/_data/` to show up.
@@ -107,11 +112,11 @@ In English, this would read: "Create a set of tabs with the alias `servicesample
107112
and have tabs visually labeled "JSON" and "YAML" that use `json` and `yaml` Rouge syntax highlighting, which display the contents of
108113
`service-sample.{extension}` on the page, and link to the file in GitHub at (full path)."
109114

110-
Example file: [Pods: Multi-Container](/docs/user-guide/pods/multi-container/).
115+
Example file: [Pods: Multi-Container](http://kubernetes.io/docs/user-guide/pods/multi-container/).
111116

112117
## Use a global variable
113118

114-
The `/_config.yml` file defines some useful variables you can use when editing docs.
119+
The `/_config.yml` file defines some useful variables you can use when editing docs.
115120

116121
* `page.githubbranch`: The name of the GitHub branch on the Kubernetes repo that is associated with this branch of the docs. e.g. `release-1.2`
117122
* `page.version` The version of Kubernetes associated with this branch of the docs. e.g. `v1.2`
@@ -133,17 +138,27 @@ The current version of the website is served out of the `master` branch.
133138

134139
All versions of the site that relate to past and future versions will be named after their Kubernetes release number. For example, [the old branch for the 1.1 docs is called `release-1.1`](https://github.com/kubernetes/kubernetes.github.io/tree/release-1.1).
135140

136-
Changes in the "docsv2" branch (where we are testing a revamp of the docs) are automatically staged here:
141+
Changes in the "docsv2" branch (where we are testing a revamp of the docs) are automatically staged here:
137142
http://k8sdocs.github.io/docs/tutorials/
138143

139144
Changes in the "release-1.1" branch (for k8s v1.1 docs) are automatically staged here:
140145
http://kubernetes-v1-1.github.io/
141146

142-
Changes in the "release-1.3" branch (for k8s v1.3 docs) are automatically staged here:
147+
Changes in the "release-1.3" branch (for k8s v1.3 docs) are automatically staged here:
143148
http://kubernetes-v1-3.github.io/
144149

145150
Editing of these branches will kick off a build using Travis CI that auto-updates these URLs; you can monitor the build progress at [https://travis-ci.org/kubernetes/kubernetes.github.io](https://travis-ci.org/kubernetes/kubernetes.github.io).
146151

152+
## Partners
153+
Partners can get their logos added to the partner section of the [community page](http://k8s.io/community) by following the below steps and meeting the below logo specifications. Partners will also need to have a URL that is specific to integrating with Kubernetes ready; this URL will be the destination when the logo is clicked.
154+
155+
* The partner product logo should be a transparent png image centered in a 215x125 px frame. (look at the existing logos for reference)
156+
* The logo must link to a URL that is specific to integrating with Kubernetes, hosted on the partner's site.
157+
* The logo should be named *product-name*_logo.png and placed in the `/images/community_logos` folder.
158+
* The image reference (including the link to the partner URL) should be added in `community.html` under `<div class="partner-logos" > ...</div>`.
159+
* Please do not change the order of the existing partner images. Append your logo to the end of the list.
160+
* Once completed and tested the look and feel, submit the pull request.
161+
147162
## Thank you!
148163

149164
Kubernetes thrives on community participation and we really appreciate your

_data/guides.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,17 @@ toc:
6161
- title: Garbage collection
6262
path: /docs/user-guide/garbage-collector/
6363

64+
- title: Batch Jobs
65+
section:
66+
- title: Jobs
67+
path: /docs/user-guide/jobs/
68+
- title: Parallel Processing using Expansions
69+
path: /docs/user-guide/jobs/expansions/
70+
- title: Coarse Parallel Processing using a Work Queue
71+
path: /docs/user-guide/jobs/work-queue-1/
72+
- title: Fine Parallel Processing using a Work Queue
73+
path: /docs/user-guide/jobs/work-queue-2/
74+
6475
- title: Service Discovery and Load Balancing
6576
section:
6677
- title: Connecting Applications with Services
@@ -132,6 +143,8 @@ toc:
132143
path: /docs/getting-started-guides/
133144
- title: Running Kubernetes on Your Local Machine
134145
section:
146+
- title: Running Kubernetes Locally via Minikube
147+
path: /docs/getting-started-guides/minikube/
135148
- title: Running Kubernetes Locally via Docker
136149
path: /docs/getting-started-guides/docker/
137150
- title: Running Kubernetes Locally with No VM
@@ -146,8 +159,10 @@ toc:
146159
path: /docs/getting-started-guides/gce/
147160
- title: Running Kubernetes on AWS EC2
148161
path: /docs/getting-started-guides/aws/
149-
- title: Running Kubernetes on Azure
162+
- title: Running Kubernetes on Azure (Weave-based)
150163
path: /docs/getting-started-guides/coreos/azure/
164+
- title: Running Kubernetes on Azure (Flannel-based)
165+
path: /docs/getting-started-guides/azure/
151166
- title: Running Kubernetes on CenturyLink Cloud
152167
path: /docs/getting-started-guides/clc/
153168
- title: Portable Multi-Node Clusters

_data/samples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ toc:
7676
- title: Nodejs + Mongo
7777
path: https://github.com/kubernetes/kubernetes/tree/release-1.2/examples/nodesjs-mongodb
7878
- title: Petstore
79-
path: https://github.com/kubernetes/kubernetes/tree/release-1.2/examples/k8spetstore/
79+
path: https://github.com/kubernetes/kubernetes/tree/release-1.2/examples/k8petstore/

_data/support.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ toc:
4040
path: https://github.com/kubernetes/kubernetes/milestones/
4141
- title: Contributing to Kubernetes Documentation
4242
path: /editdocs/
43+
- title: New Template Instructions
44+
path: /docs/templatedemos/

_includes/templates/_errorthrower.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
### ERROR: You must define a <span style="font-family: monospace">`{{ include.missing_block }}`</span> block
2+
{: style="color:red" }
3+
4+
This template requires that you provide text that {{ include.purpose }}. The text in this block will
5+
be displayed under the heading **{{ include.heading }}**.
6+
7+
To get rid of this message and take advantage of this template, define the `{{ include.missing_block }}`
8+
variable and populate it with content.
9+
10+
```liquid
11+
{% raw %}{%{% endraw %} capture {{ include.missing_block }} {% raw %}%}{% endraw %}
12+
Text that {{ include.purpose }}.
13+
{% raw %}{%{% endraw %} endcapture {% raw %}%}{% endraw %}
14+
```
15+
16+
<!-- TEMPLATE_ERROR -->

_includes/templates/concept-overview.md

Lines changed: 9 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,8 @@
1010

1111
{% else %}
1212

13-
### ERROR: You must define a "what_is" block
14-
{: style="color:red" }
15-
16-
This template requires that you explain what this concept is. This explanation will
17-
be displayed under the heading, **What is a {{ concept }}?**
18-
19-
To get rid of this message and take advantage of this template, define the `what_is`
20-
variable and populate it with content.
13+
{% include templates/_errorthrower.md missing_block='what_is' heading='What is a (Concept)?' purpose='explains what this concept is and its purpose.' %}
2114

22-
```liquid
23-
{% raw %}{% capture what_is %}{% endraw %}
24-
A {{ concept }} does x and y and z...(etc, etc, text goes on)
25-
{% raw %}{% endcapture %}{% endraw %}
26-
```
2715
{% endif %}
2816

2917

@@ -35,45 +23,21 @@ A {{ concept }} does x and y and z...(etc, etc, text goes on)
3523

3624
{% else %}
3725

38-
### ERROR: You must define a "when_to_use" block
39-
{: style="color:red" }
40-
41-
This template requires that you explain when to use this object. This explanation will
42-
be displayed under the heading, **When to use {{ concept }}s**
26+
{% include templates/_errorthrower.md missing_block='when_to_use' heading='When to use (Concept)' purpose='explains when to use this object.' %}
4327

44-
To get rid of this message and take advantage of this template, define the `when_to_use`
45-
variable and populate it with content.
46-
47-
```liquid
48-
{% raw %}{% capture when_to_use %}{% endraw %}
49-
You should use {{ concept }} when...
50-
{% raw %}{% endcapture %}{% endraw %}
51-
```
5228
{% endif %}
5329

5430

5531
{% if when_not_to_use %}
5632

57-
### When not to use {{ concept }}s (alternatives)
33+
### When not to use {{ concept }}s
5834

5935
{{ when_not_to_use }}
6036

6137
{% else %}
6238

63-
### ERROR: You must define a "when_not_to_use" block
64-
{: style="color:red" }
65-
66-
This template requires that you explain when not to use this object. This explanation will
67-
be displayed under the heading, **When not to use {{ concept }}s (alternatives)**
68-
69-
To get rid of this message and take advantage of this template, define the `when_not_to_use`
70-
block and populate it with content.
39+
{% include templates/_errorthrower.md missing_block='when_not_to_use' heading='When not to use (Concept)' purpose='explains when not to use this object.' %}
7140

72-
```liquid
73-
{% raw %}{% capture when_not_to_use %}{% endraw %}
74-
You should not use {{ concept }} if...
75-
{% raw %}{% endcapture %}{% endraw %}
76-
```
7741
{% endif %}
7842

7943

@@ -85,69 +49,23 @@ You should not use {{ concept }} if...
8549

8650
{% else %}
8751

88-
### ERROR: You must define a "status" block
89-
{: style="color:red" }
90-
91-
This template requires that you explain the current status of support for this object.
92-
This explanation will be displayed under the heading, **{{ concept }} status**.
52+
{% include templates/_errorthrower.md missing_block='status' heading='Retrieving status for a (Concept)' purpose='explains how to retrieve a status description for this object.' %}
9353

94-
To get rid of this message and take advantage of this template, define the `status`
95-
block and populate it with content.
96-
97-
```liquid
98-
{% raw %}{% capture status %}{% endraw %}
99-
The current status of {{ concept }}s is...
100-
{% raw %}{% endcapture %}{% endraw %}
101-
```
10254
{% endif %}
10355

10456

105-
{% if required_fields %}
57+
{% if usage %}
10658

107-
### {{ concept }} spec
59+
#### Usage
10860

109-
#### Required Fields
110-
111-
{{ required_fields }}
61+
{{ usage }}
11262

11363
{% else %}
11464

115-
### ERROR: You must define a "required_fields" block
116-
{: style="color:red" }
117-
118-
This template requires that you provide a Markdown list of required fields for this
119-
object. This list will be displayed under the heading **Required Fields**.
120-
121-
To get rid of this message and take advantage of this template, define the `required_fields`
122-
block and populate it with content.
123-
124-
```liquid
125-
{% raw %}{% capture required_fields %}
126-
* `kind`: Always `Pod`.
127-
* `apiVersion`: Currently `v1`.
128-
* `metadata`: An object containing:
129-
* `name`: Required if `generateName` is not specified. The name of this pod.
130-
It must be an
131-
[RFC1035](https://www.ietf.org/rfc/rfc1035.txt) compatible value and be
132-
unique within the namespace.
133-
{% endcapture %}{% endraw %}
134-
```
135-
136-
**Note**: You can also define a `common_fields` block that will go under a heading
137-
directly underneath **Required Fields** called **Common Fields**, but it is
138-
not required.
139-
{% endif %}
140-
141-
142-
{% if common_fields %}
143-
144-
#### Common Fields
145-
146-
{{ common_fields }}
65+
{% include templates/_errorthrower.md missing_block='usage' heading='Usage' purpose='shows the most basic, common use case for this object, in the form of a code sample, command, etc, using tabs to show multiple approaches' %}
14766

14867
{% endif %}
14968

150-
15169
<!-- continuing the "if concept" if/then: -->
15270

15371
{% else %}

_includes/templates/kubectl.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{% if command %}
2+
3+
# {% if site.data.kubectl[command].name != "kubectl" %}kubectl {% endif %}{{ site.data.kubectl[command].name }}
4+
5+
{{ site.data.kubectl[command].synopsis }}
6+
7+
## Description
8+
9+
{{ site.data.kubectl[command].description }}
10+
11+
{% if site.data.kubectl[command].options %}
12+
## Options
13+
14+
| Option | Shorthand | Default Value | Usage |
15+
|--------------------|---------------|-------|{% for option in site.data.kubectl[command].options %}
16+
| `{{option.name | strip}}` | {% if option.shorthand %}`{{ option.shorthand | strip }}`{% endif %} | {% if option.default_value %}`{{option.default_value| strip}}`{% endif %} | {% if option.usage %}{{option.usage| strip | replace:'|',', '}}{% endif %} |{% endfor %}
17+
{% endif %}
18+
19+
{% if site.data.kubectl[command].inherited_options %}
20+
## Inherited Options
21+
22+
| Option | Shorthand | Default Value | Usage |
23+
|--------------------|---------------|-------|{% for option in site.data.kubectl[command].inherited_options %}
24+
| `{{option.name | strip}}` | {% if option.shorthand %}`{{ option.shorthand | strip }}`{% endif %} | {% if option.default_value %}`{{option.default_value| strip}}`{% endif %} | {% if option.usage %}{{option.usage| strip | replace:'|',', '}}{% endif %} |{% endfor %}
25+
{% endif %}
26+
27+
## See also
28+
29+
{% for seealso in site.data.kubectl[command].see_also %}
30+
- [`{{ seealso }}`](/docs/kubectl/{% if seealso != "kubectl" %}kubectl_{{seealso}}{% endif %})
31+
{% endfor %}
32+
33+
{% else %}
34+
35+
{% include templates/_errorthrower.md missing_block='command' heading='kubectl (command)' purpose='names the kubectl command, so that the appropriate YAML file (from _data/kubectl) can be transformed into a page.' %}
36+
37+
{% endif %}

0 commit comments

Comments
 (0)