Go to file
Matt Fischer bdebd9895f nginx service/deployment needs to be cleanedup
If you plan on recreating the nginx service & deployment you need to remove both or kubernetes will refuse to rebuild them. Otherwise you get this error:

root@compute3:~# kubectl run nginx --image=nginx --port=80
Error from server: deployments.extensions "nginx" already exists

Additionally this commit fixes the numbering in the deleted section. The numbered list restarts at 1 due to the indented code, so a simple work around is to escape the period in the numbered list.
2016-06-18 10:29:10 -06:00
_data Merge pull request #535 from gnomeontherun/vagrant-missing 2016-05-31 13:12:35 -07:00
_includes New template instructions 2016-06-17 15:34:20 -07:00
_layouts docs right margin fix 2016-03-14 11:49:45 -07:00
_sass Adding partner section to community page 2016-06-02 10:57:13 -07:00
css Adds 'copy code' functionality to include code module 2016-03-25 14:43:15 -07:00
docs nginx service/deployment needs to be cleanedup 2016-06-18 10:29:10 -06:00
images New template instructions 2016-06-17 15:34:20 -07:00
js Remove js-based header anchor offset, suggested by @bobcatfish 2016-05-22 19:28:46 -07:00
.gitignore Update .gitignore 2016-03-16 14:52:06 -07:00
404.md Forward /docs/user-guide/overview to /docs/whatisk8s 2016-05-05 15:29:18 -07:00
CNAME Update CNAME 2016-03-11 09:16:19 +00:00
LICENSE Update LICENSE 2016-03-07 07:12:53 +00:00
README.md Adding partner section to community page 2016-06-02 10:57:13 -07:00
_config.yml Update _config.yml 2016-03-17 15:30:28 -07:00
community.html Typo fix on community page 2016-06-03 10:01:22 -07:00
editdocs.md Improved doc editing instructions/sharing with README.md 2016-03-07 15:07:48 +00:00
feed.xml Adds Answerdash, Analytics, feed.xml, LICENSE, robots.txt, and Google Site Verification files 2016-03-04 13:50:51 -08:00
google0a2c3c07b75f9679.html Adds Answerdash, Analytics, feed.xml, LICENSE, robots.txt, and Google Site Verification files 2016-03-04 13:50:51 -08:00
google2a9463bd6a902e34.html Adds Answerdash, Analytics, feed.xml, LICENSE, robots.txt, and Google Site Verification files 2016-03-04 13:50:51 -08:00
googlece48a67808b497a5.html Adds Answerdash, Analytics, feed.xml, LICENSE, robots.txt, and Google Site Verification files 2016-03-04 13:50:51 -08:00
googledb1a1313d9ca6e35.html New site verification file 2016-03-11 08:04:19 +00:00
index.html Improve homepage 2016-06-03 19:21:55 +00:00
jquery-ui.html Import from Container Engine docs, addition of Tabs functionality, various link fixes 2016-03-16 15:54:34 -07:00
package.json Create package.json 2016-03-23 18:03:46 -07:00
robots.txt Update robots.txt 2016-03-11 08:11:03 +00:00
sitemap.xml Sitemap and other TOC changes 2016-02-23 01:10:47 -08:00
update-imported-docs.sh Refdocs for 1.2 import 2016-03-07 16:51:25 +00:00

README.md

Instructions for Contributing to the Docs/Website

Welcome! We are very pleased you want to contribute to the documentation and/or website for Kubernetes.

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.

If you want to see your changes staged without having to install anything locally, remove the CNAME file in this directory and change the name of the fork to be:

YOUR_GITHUB_USERNAME.github.io

Then, visit: http://YOUR_GITHUB_USERNAME.github.io

You should see a special-to-you version of the site.

Editing/staging the site locally

If you have files to upload, or just want to work offline, run the below commands to setup your environment for running GitHub pages locally. Then, any edits you make will be viewable on a lightweight webserver that runs on your local machine.

First install rvm

curl -sSL https://get.rvm.io | bash -s stable

Then load it into your environment

source ${HOME}/.rvm/scripts/rvm (or whatever is prompted by the installer)

Then install Ruby 2.2 or higher

rvm install ruby-2.2.4
rvm use ruby-2.2.4 --default

Verify that this new version is running (optional)

which ruby
ruby -v

Install the GitHub Pages package, which includes Jekyll

gem install github-pages

Clone our site

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

Make any changes you want. Then, to see your changes locally:

cd kubernetes.github.io
jekyll serve

Your copy of the site will then be viewable at: http://localhost:4000 (or wherever Ruby tells you).

If you're a bit rusty with git/GitHub, you might wanna read this for a refresher.

The above instructions work on Mac and Linux. These instructions might help for Windows users.

Common Tasks

Edit Page Titles or Change the Left Navigation

Edit the yaml files in /_data/ for the Guides, Reference, Samples, or Support areas.

You may have to exit and jekyll clean before restarting the jekyll serve to get changes to files in /_data/ to show up.

Add Images

Put the new image in /images/docs/ if it's for the documentation, and just /images/ if it's for the website.

For diagrams, we greatly prefer SVG files!

Include code from another file

To include a file that is hosted on this GitHub repo, insert this code:

{% include code.html language="<LEXERVALUE>" file="<RELATIVEPATH>" ghlink="<PATHFROMROOT>" %}
  • LEXERVALUE: The language in which the file was written; must be a value supported by Rouge.
  • RELATIVEPATH: The path to the file you're including, relative to the current file.
  • PATHFROMROOT: The path to the file relative to root, e.g. /docs/admin/foo.yaml

To include a file that is hosted in the external, main Kubernetes repo, make sure it's added to /update-imported-docs.sh, and run it so that the file gets downloaded, then enter:

{% include code.html language="<LEXERVALUE>" file="<RELATIVEPATH>" k8slink="<PATHFROMK8SROOT>" %}
  • PATHFROMK8SROOT: The path to the file relative to the root of the Kubernetes repo, e.g. /examples/rbd/foo.yaml

Using tabs for multi-language examples

By specifying some inline CSV in a varable called tabspec, you can include a file called tabs.html that generates tabs showing code examples in multiple langauges.

{% capture tabspec %}servicesample
JSON,json,service-sample.json,/docs/user-guide/services/service-sample.json
YAML,yaml,service-sample.yaml,/docs/user-guide/services/service-sample.yaml{% endcapture %}
{% include tabs.html %}

In English, this would read: "Create a set of tabs with the alias servicesample, and have tabs visually labeled "JSON" and "YAML" that use json and yaml Rouge syntax highlighting, which display the contents of service-sample.{extension} on the page, and link to the file in GitHub at (full path)."

Example file: Pods: Multi-Container.

Use a global variable

The /_config.yml file defines some useful variables you can use when editing docs.

  • 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
  • page.version The version of Kubernetes associated with this branch of the docs. e.g. v1.2
  • page.docsbranch The name of the GitHub branch on the Docs/Website repo that you are currently using. e.g. release-1.1 or master

This keeps the docs you're editing aligned with the Kubernetes version you're talking about. For example, if you define a link like so, you'll never have to worry about it going stale in future doc branches:

View the README [here](http://releases.k8s.io/{{page.githubbranch}}/cluster/addons/README.md).

That, of course, will send users to:

http://releases.k8s.io/release-1.2/cluster/addons/README.md

(Or whatever Kubernetes release that docs branch is associated with.)

Branch structure

The current version of the website is served out of the master branch.

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.

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

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

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

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.

Partners

Partners can get their logos added to the partner section of the community page 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.

  • The partner product logo should be a transparent png image centered in a 215x125 px frame. (look at the existing logos for reference)
  • The logo must link to a URL that is specific to integrating with Kubernetes, hosted on the partner's site.
  • The logo should be named product-name_logo.png and placed in the /images/community_logos folder.
  • The image reference (including the link to the partner URL) should be added in community.html under <div class="partner-logos" > ...</div>.
  • Please do not change the order of the existing partner images. Append your logo to the end of the list.
  • Once completed and tested the look and feel, submit the pull request.

Thank you!

Kubernetes thrives on community participation and we really appreciate your contributions to our site and our documentation!