Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Man pages - initial release #1759

Merged
merged 1 commit into from
Oct 13, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/man/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM golang:1.3
RUN mkdir -p /go/src/github.com/cpuguy83
RUN mkdir -p /go/src/github.com/cpuguy83 \
&& git clone -b v1 https://github.com/cpuguy83/go-md2man.git /go/src/github.com/cpuguy83/go-md2man \
&& cd /go/src/github.com/cpuguy83/go-md2man \
&& go get -v ./...
CMD ["/go/bin/go-md2man", "--help"]
41 changes: 41 additions & 0 deletions docs/man/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Kubernetes Documentation
====================

This directory contains the Docker user manual in the Markdown format.
Do *not* edit the man pages in the man1 directory. Instead, amend the
Markdown (*.md) files.

# File List

kubecfg.md
docker-attach.md
docker-build.md
Dockerfile
md2man-all.sh

# Generating man pages from the Markdown files

The recommended approach for generating the man pages is via a Docker
container using the supplied `Dockerfile` to create an image with the correct
environment. This uses `go-md2man`, a pure Go Markdown to man page generator.

## Building the md2man image

There is a `Dockerfile` provided in the `docker/docs/man` directory.

Using this `Dockerfile`, create a Docker image tagged `docker/md2man`:

docker build -t docker/md2man .

## Utilizing the image

Once the image is built, run a container using the image with *volumes*:

docker run -v /<path-to-git-dir>/kubernetes/docs/man:/docs:rw \
-w /docs -i docker/md2man /docs/md2man-all.sh

The `md2man` Docker container will process the Markdown files and generate
the man pages inside the `docker/docs/man/man1` directory using
Docker volumes. For more information on Docker volumes see the man page for
`docker run` and also look at the article [Sharing Directories via Volumes]
(http://docs.docker.com/use/working_with_volumes/).
115 changes: 115 additions & 0 deletions docs/man/kube-apiserver.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
% KUBERNETES(1) kubernetes User Manuals
% Scott Collier
% October 2014
# NAME
kube-apiserver \- Provides the API for kubernetes orchestration.

# SYNOPSIS
**kube-apiserver** [OPTIONS]

# DESCRIPTION

The **kubernetes** API server validates and configures data for 3 types of objects: pods, services, and replicationControllers. Beyond just servicing REST operations, the API Server does two other things as well: 1. Schedules pods to worker nodes. Right now the scheduler is very simple. 2. Synchronize pod information (where they are, what ports they are exposing) with the service configuration.

The the kube-apiserver several options.

# OPTIONS
**-address**=""
The address on the local server to listen to. Default 127.0.0.1

**-allow_privileged**=""
If true, allow privileged containers.

**-alsologtostderr**=
log to standard error as well as files. Default is false.

**-api_prefix**="/api"
The prefix for API requests on the server. Default '/api'

**-cloud_config**=""
The path to the cloud provider configuration file. Empty string for no configuration file.

**-cloud_provider**=""
The provider for cloud services. Empty string for no provider.

**-cors_allowed_origins**=[]
List of allowed origins for CORS, comma separated. An allowed origin can be a regular expression to support subdomain matching. If this list is empty CORS will not be enabled.

**-etcd_servers**=[]
List of etcd servers to watch (http://ip:port), comma separated

**-health_check_minions**=
If true, health check minions and filter unhealthy ones. Default true.

**-log_backtrace_at=**:0
when logging hits line file:N, emit a stack trace

**-log_dir**=""
If non-empty, write log files in this directory

**-log_flush_frequency**=5s
Maximum number of seconds between log flushes. Default is 5 seconds.

**-logtostderr**=
log to standard error instead of files. Default is false.

**-machines**=[]
List of machines to schedule onto, comma separated.

**-minion_cache_ttl**=30s
Duration of time to cache minion information. Default 30 seconds.

**-minion_port**=10250
The port at which kubelet will be listening on the minions. Default is 10250.

**-minion_regexp**=""
If non empty, and -cloud_provider is specified, a regular expression for matching minion VMs.

**-port**=8080
The port to listen on. Default is 8080.

**-stderrthreshold**=0
logs at or above this threshold go to stderr. Default is 0.

**-storage_version**=""
The version to store resources with. Defaults to server preferred.

**-v**=0
Log level for V logs.

**-version**=false
Print version information and quit. Default is false.

**-vmodule**=
comma-separated list of pattern=N settings for file-filtered logging

# EXAMPLES

The kube-apiserver can be called manually or from systemd. An example unit file looks as such:

[Unit]
Description=Kubernetes API Server

[Service]
EnvironmentFile=/etc/kubernetes/config
EnvironmentFile=/etc/kubernetes/apiserver
User=kube
ExecStart=/usr/bin/kube-apiserver \
--logtostderr=${KUBE_LOGTOSTDERR} \
--v=${KUBE_LOG_LEVEL} \
--etcd_servers=${KUBE_ETCD_SERVERS} \
--address=${KUBE_API_ADDRESS} \
--port=${KUBE_API_PORT} \
--machines=${MINION_ADDRESSES} \
--minion_port=${MINION_PORT} \
--allow_privileged=${KUBE_ALLOW_PRIV}
Restart=on-failure

[Install]
WantedBy=multi-user.target

Where the variables are stored in the /etc/kubernetes/ environment files.

# HISTORY
October 2014, Originally compiled by Scott Collier (scollier at redhat dot com) based
on the kubernetes source material and internal work.
91 changes: 91 additions & 0 deletions docs/man/kube-controller-manager.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
% KUBERNETES(1) kubernetes User Manuals
% Scott Collier
% October 2014
# NAME
kube-controller-manager \- Enforces kubernetes services.

# SYNOPSIS
**kube-controller-manager** [OPTIONS]

# DESCRIPTION

The **kubernetes** controller manager is really a service that is layered on top of the simple pod API. To enforce this layering, the logic for the replicationController is actually broken out into another server. This server watches etcd for changes to replicationController objects and then uses the public Kubernetes API to implement the replication algorithm.

The kube-controller-manager has several options.

# OPTIONS
**-address**=""
The address on the local server to listen to. Default 127.0.0.1.

**-allow_privileged**="false"
If true, allow privileged containers.

**-address=**"127.0.0.1"
The address to serve from.

**-alsologtostderr**=false
log to standard error as well as files.

**-api_version**=""
The API version to use when talking to the server.

**-insecure_skip_tls_verify**=false
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.

**-log_backtrace_at**=:0
when logging hits line file:N, emit a stack trace.

**-log_dir**=""
If non-empty, write log files in this directory.

**-log_flush_frequency**=5s
Maximum number of seconds between log flushes.

**-logtostderr**=false
log to standard error instead of files.

**-master**=""
The address of the Kubernetes API server.

**-port**=10252
The port that the controller-manager's http service runs on.

**-stderrthreshold**=0
logs at or above this threshold go to stderr.

**-v**=0
log level for V logs.

**-version**=false
Print version information and quit.

**-vmodule**=
comma-separated list of pattern=N settings for file-filtered logging.

# EXAMPLES

The kube-controller-manager can be called manually or from systemd. An example unit file looks as such:

[Unit]
Description=Kubernetes Controller Manager

[Service]
EnvironmentFile=/etc/kubernetes/config
EnvironmentFile=/etc/kubernetes/apiserver
EnvironmentFile=/etc/kubernetes/controller-manager
User=kube
ExecStart=/usr/bin/kube-controller-manager \
--logtostderr=${KUBE_LOGTOSTDERR} \
--v=${KUBE_LOG_LEVEL} \
--master=${KUBE_MASTER}
Restart=on-failure

[Install]
WantedBy=multi-user.target


Where the variables are stored in the /etc/kubernetes/ enfironment files.

# HISTORY
October 2014, Originally compiled by Scott Collier (scollier at redhat dot com) based
on the kubernetes source material and internal work.
89 changes: 89 additions & 0 deletions docs/man/kube-proxy.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
% KUBERNETES(1) kubernetes User Manuals
% Scott Collier
% October 2014
# NAME
kube-proxy \- Provides network proxy services.

# SYNOPSIS
**kube-proxy** [OPTIONS]

# DESCRIPTION

The **kubernetes** network proxy runs on each node. This reflects services as defined in the Kubernetes API on each node and can do simple TCP stream forwarding or round robin TCP forwarding across a set of backends. Service endpoints are currently found through Docker-links-compatible environment variables specifying ports opened by the service proxy. Currently the user must select a port to expose the service on on the proxy, as well as the container's port to target.

The kube-proxy takes several options.

# OPTIONS
**-alsologtostderr**=false
log to standard error as well as files

**-api_version=**""
The API version to use when talking to the server

**-bindaddress**="0.0.0.0"
The address for the proxy server to serve on (set to 0.0.0.0 or "" for all interfaces)

**-configfile**="/tmp/proxy_config"
Configuration file for the proxy

**-etcd_servers**=[]
List of etcd servers to watch (http://ip:port), comma separated (optional)

**-insecure_skip_tls_verify**=false
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.

**-log_backtrace_at**=:0
when logging hits line file:N, emit a stack trace

**-log_dir**=""
If non-empty, write log files in this directory

**-log_flush_frequency**=5s
Maximum number of seconds between log flushes

**-logtostderr**=false
log to standard error instead of files

**-master**=""
The address of the Kubernetes API server

**-stderrthreshold**=0
logs at or above this threshold go to stderr

**-v**=0
log level for V logs

**-version**=false
Print version information and quit

**-vmodule**=
comma-separated list of pattern=N settings for file-filtered logging


# EXAMPLES

The kube-proxy can be called manually or from systemd. An example unit file looks as such:

[Unit]
Description=Kubernetes Proxy
# the proxy crashes if etcd isn't reachable.
# https://github.com/GoogleCloudPlatform/kubernetes/issues/1206
After=network.target

[Service]
EnvironmentFile=/etc/kubernetes/config
EnvironmentFile=/etc/kubernetes/proxy
ExecStart=/usr/bin/kube-proxy \
--logtostderr=${KUBE_LOGTOSTDERR} \
--v=${KUBE_LOG_LEVEL} \
--etcd_servers=${KUBE_ETCD_SERVERS}
Restart=on-failure

[Install]
WantedBy=multi-user.target

Where the variables are stored in the /etc/kubernetes/ directory.

# HISTORY
October 2014, Originally compiled by Scott Collier (scollier at redhat dot com) based
on the kubernetes source material and internal work.