Documentation Home

Documentation for using and learning about Kubernetes.

Edit This Page

Staging Your Documentation Changes

This page shows how to stage content that you want to contribute to the Kubernetes documentation.

Before you begin

Create a fork of the Kubernetes documentation repository as described in Creating a Documentation Pull Request.

Staging a pull request

When you create a pull request, either against the master or <vnext> branch, your changes are staged in a custom subdomain on Netlify so that you can see your changes in rendered form before the pull request is merged.

  1. In your GitHub account, in your new branch, submit a pull request to the kubernetes/kubernetes.github.io repository. This opens a page that shows the status of your pull request.

  2. Scroll down to the list of automated checks. Click Show all checks. Wait for the deploy/netlify check to complete. To the right of deploy/netlify, click Details. This opens a staging site where you can see your changes.

Staging locally using Docker

You can use the k8sdocs Docker image to run a local staging server. If you’re interested, you can view the Dockerfile for this image.

  1. Install Docker if you don’t already have it.

  2. Clone your fork to your local development machine.

  3. In the root of your cloned repository, enter this command to start a local web server:

     docker run -ti --rm -v "$PWD":/k8sdocs -p 4000:4000 gcr.io/google-samples/k8sdocs:1.1
    
  4. View your staged content at http://localhost:4000.

Staging locally without Docker

  1. Install Ruby 2.2 or later.

  2. Install RubyGems.

  3. Verify that Ruby and RubyGems are installed:

     gem --version
    
  4. Install the GitHub Pages package, which includes Jekyll:

     gem install github-pages
    
  5. Clone your fork to your local development machine.

  6. In the root of your cloned repository, enter this command to start a local web server:

     jekyll serve
    
  7. View your staged content at http://localhost:4000.

NOTE: If you do not want Jekyll to interfere with your other globally installed gems, you can use bundler:

gem install bundler bundle install bundler exec jekyll serve

Regardless of whether you use bundler or not, your copy of the site will then be viewable at: http://localhost:4000

What’s next

Analytics

Create an Issue Edit this Page