Skip to content

Commit bbcc0f3

Browse files
committed
Documentation updates
1 parent a67ab0b commit bbcc0f3

11 files changed

+507
-105
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Our change log is available [here](docs/releases/).

HISTORY.md

-14
This file was deleted.

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ launching a Kubernetes cluster hosted on AWS.
3939
* Ability to generate configuration files for AWS [CloudFormation](https://aws.amazon.com/cloudformation/) and Terraform [Terraform configuration](/docs/terraform.md)
4040
* Supports custom Kubernetes [add-ons](/docs/addons.md)
4141
* Command line [autocompletion](/docs/cli/kops_completion.md)
42+
* Manifest Based API [Configuration](/docs/manifests_and_customizing_via_api.md)
4243
* Community supported!
4344

4445

@@ -58,6 +59,9 @@ Documentation is in the `/docs` directory, [and the index is here.](docs/README.
5859
$ brew update && brew install kops
5960

6061
```
62+
63+
The `kops` binary is also available via our [releases](https://github.com/kubernetes/kops/releases/latest).
64+
6165
### Linux
6266

6367
Download the [latest release](https://github.com/kubernetes/kops/releases/latest), then:
@@ -67,9 +71,6 @@ $ chmod +x kops-linux-amd64 # Add execution permissions
6771
$ mv kops-linux-amd64 /usr/local/bin/kops # Move the kops to /usr/local/bin
6872
```
6973

70-
71-
72-
7374
## History
7475

7576
See the [releases](https://github.com/kubernetes/kops/releases) for more

docs/README.md

+56-38
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
Documentation Index
2-
===================
1+
# Documentation Index
32

4-
Quick start
5-
-----------
3+
## Quick start
64
* [Getting started on AWS](aws.md)
75
* [CLI reference](cli/kops.md)
86

97

10-
Overview
11-
--------
8+
## Overview
129

10+
* [Getting started on AWS](aws.md)
1311
* [Command-line interface](#commandline-interface)
1412
* [Inspection](#inspection)
1513
* [`kops` design documents](#kops-design-documents)
@@ -19,8 +17,7 @@ Overview
1917
* [Workflows](#workflows)
2018

2119

22-
23-
### Command-line interface ###
20+
## Command-line interface
2421

2522
* [CLI argument explanations](arguments.md)
2623
* [CLI reference](cli/kops.md)
@@ -32,52 +29,53 @@ Overview
3229
* how to point kubectl to your `kops` cluster
3330

3431

35-
### Inspection ###
36-
37-
* [Download `kops` configuration](download_config.md)
38-
* methods to download the current generated `kops` configuration
39-
* [Get AWS subdomain NS records](ns.md)
40-
41-
42-
### `kops` design documents ###
43-
44-
* [`kops` cluster boot sequence](boot-sequence.md)
45-
* [`kops` cluster spec](cluster_spec.md)
46-
* [`kops` instance groups](instance_groups.md)
47-
* [`kops` philosophy](philosophy.md)
48-
* [`kops` state store](state.md)
49-
50-
51-
### Networking ###
52-
53-
* [Networking overview](networking.md)
54-
* [Run `kops` in an existing VPC](run_in_existing_vpc.md)
55-
* [Supported network topologies](topology.md)
56-
* [Subdomain setup](creating_subdomain.md)
57-
58-
59-
### Operations ###
32+
## Operations
6033

34+
* API / Manifest Custom Values
35+
* [godocs Cluster specific documentation - `spec`](https://godoc.org/k8s.io/kops/pkg/apis/kops#ClusterSpec).
36+
* [godocs Instance Group specific documentation - `spec`] (https://godoc.org/k8s.io/kops/pkg/apis/kops#InstanceGroupSpec).
6137
* [Cluster addon manager](addon_manager.md)
6238
* [Cluster addons](addons.md)
6339
* [Cluster configuration management](changing_configuration.md)
40+
* [`kops` cluster API definitions](cluster_spec.md)
41+
* overview of some of the API value to customize a `kops` cluster
6442
* [Cluster upgrades and migrations](cluster_upgrades_and_migrations.md)
6543
* [`etcd` volume encryption setup](etcd_volume_encryption.md)
6644
* [`etcd` backup setup](etcd_backup.md)
6745
* [GPU setup](gpu.md)
6846
* [High Availability](high_availability.md)
47+
* [`kops` instance groups API](instance_groups.md)
48+
* overview of some of the API value to customize a `kops` groups of ks8 nodes
6949
* [InstanceGroup images](images.md)
7050
* how to use other image for cluster nodes, and information on available/tested images
51+
* [Using Manifests and Customization via the API](manifests_and_customizing_via_api.md)
52+
* how to use YAML to manage clusters.
53+
* how to customize cluster via the `kops` API.
7154
* [`k8s` upgrading](upgrade.md)
7255
* [`kops` updating](update_kops.md)
7356
* [`kube-up` to `kops` upgrade](upgrade_from_kubeup.md)
7457
* [Label management](labels.md)
7558
* for cluster nodes
7659
* [Secret management](secrets.md)
77-
* [Single-master to multi-master update](single-to-multi-master.md)
60+
* [Moving from a Single Master to Multiple HA Masters](single-to-multi-master.md)
7861

7962

80-
### Security ###
63+
## Networking
64+
65+
* [Networking Overview including CNI](networking.md)
66+
* [Run `kops` in an existing VPC](run_in_existing_vpc.md)
67+
* [Supported network topologies](topology.md)
68+
* [Subdomain setup](creating_subdomain.md)
69+
70+
71+
## `kops` design documents
72+
73+
* [`kops` cluster boot sequence](boot-sequence.md)
74+
* [`kops` philosophy](philosophy.md)
75+
* [`kops` state store](state.md)
76+
77+
78+
## Security
8179

8280
* [Bastion setup](bastion.md)
8381
* [IAM roles](iam_roles.md)
@@ -87,7 +85,27 @@ Overview
8785
* overview of secret storage, SSH credentials etc.
8886

8987

90-
### Workflows ###
88+
## Inspection
89+
90+
* [Download `kops` configuration](download_config.md)
91+
* methods to download the current generated `kops` configuration
92+
* [Get AWS subdomain NS records](ns.md)
93+
94+
95+
## Development
96+
97+
* [Developing using Docker](development/Docker.md)
98+
* [Development with vSphere](development/vsphere-dev.md)
99+
* [Documentation Guidelines](development/documentation.md)
100+
* [E2E testing with `kops` clusters](development/testing.md)
101+
* [Example on how to add a feature](development/adding_a_feature.md)
102+
* [Hack Directory](development/hack.md)
103+
* [How to update `kops` API](development/api_updates.md)
104+
* [Low level description on how kops works](how_it_works.md)
105+
* [Notes on Gossip design](development/gossip.md)
106+
* [Notes on master instance sizing](development/instancesizes.md)
107+
* [Our release process](development/release.md)
108+
* [Releasing with Homebrew](development/homebrew.md)
109+
* [Rolling Update Diagrams](development/rolling_update.md)
110+
* [Updating Go Dependencies](development/dependencies.md)
91111

92-
* [E2E testing with `kops` clusters](testing.md)
93-
* [Getting started on AWS](aws.md)

docs/arguments.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Detailed description of arguments
1+
# Detailed description of a few selected arguments
2+
3+
This list is not the full list, but a few arguments that where choosen.
24

35
## admin-access
46

@@ -24,7 +26,7 @@ See the docs in [cluster_spec.md#adminaccess](cluster_spec.md#adminaccess)
2426
`dns-zone` controls the Route53 hosted zone in which DNS records will be created. It can either by the name
2527
of the hosted zone (`example.com`), or it can be the ID of the hosted zone (`Z1GABCD1ABC2DEF`)
2628

27-
Suppose you're creating a cluster named "dev.kubernetes.example.com`:
29+
Suppose you are creating a cluster named "dev.kubernetes.example.com`:
2830

2931
* You can specify a `--dns-zone=example.com` (you can have subdomains in a hosted zone)
3032
* You could also use `--dns-zone=kubernetes.example.com`
@@ -63,9 +65,9 @@ Values:
6365

6466
`out` determines the directory into which kubectl will write the target output. It defaults to `out/terraform`
6567

66-
# YAML-only Arguments
68+
# API only Arguments
6769

68-
Certain arguments can only be passed via YAML, eg, `kops edit cluster`. The following documents some of the more interesting or lesser-known options.
70+
Certain arguments can only be passed via the API, eg, `kops edit cluster`. The following documents some of the more interesting or lesser-known options.
6971

7072
## kubeletPreferredAddressTypes
7173

@@ -79,3 +81,5 @@ kubeAPIServer:
7981
- InternalIP
8082
- ExternalIP
8183
```
84+
85+
More information about using YAML is available [here](manifests_and_customizing_via_api.md).

docs/cluster_spec.md

+32-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# Description of Keys in `config` and `cluster.spec`
22

3-
This list is not complete, but aims to document any keys that are less than self-explanatory.
3+
This list is not complete but aims to document any keys that are less than self-explanatory. Our [godoc](https://godoc.org/k8s.io/kops/pkg/apis/kops) reference provides a more detailed list of API values. [ClusterSpec](https://godoc.org/k8s.io/kops/pkg/apis/kops#ClusterSpec), defined as `kind: Cluster` in YAML, and [InstanceGroup](https://godoc.org/k8s.io/kops/pkg/apis/kops#InstanceGroup), defined as `kind: InstanceGroup` in YAML, are the two top-level API values used to describe a cluster.
44

55
## spec
66

7-
87
### api
98

109
This object configures how we expose the API:
@@ -159,9 +158,39 @@ Will result in the flag `--feature-gates=ExperimentalCriticalPodAnnotation=true,
159158

160159
### networkID
161160

162-
On AWS, this is the id of the VPC the cluster is created in. If creating a cluster from scratch, this field doesn't need to be specified at create time; `kops` will create a `VPC` for you.
161+
On AWS, this is the id of the VPC the cluster is created in. If creating a cluster from scratch, this field does not need to be specified at create time; `kops` will create a `VPC` for you.
163162

164163
```yaml
165164
spec:
166165
networkID: vpc-abcdefg1
167166
```
167+
168+
More information about running in an existing VPC is [here](run_in_existing_vpc.md).
169+
170+
### hooks
171+
172+
Hooks allow the execution of a container before the installation of Kubneretes on every node in a cluster. For intance you can install nvidia drivers for using GPUs.
173+
174+
```
175+
spec:
176+
# many sections removed
177+
hooks:
178+
- execContainer:
179+
image: kopeio/nvidia-bootstrap:1.6
180+
```
181+
182+
Install Ceph
183+
184+
```
185+
spec:
186+
# many sections removed
187+
hooks:
188+
- execContainer:
189+
command:
190+
- sh
191+
- -c
192+
- chroot /rootfs apt-get update && chroot /rootfs apt-get install -y ceph-common
193+
image: busybox
194+
```
195+
196+
File renamed without changes.

docs/download_config.md

+42-31
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,62 @@
11
# Download kops config spec file
2+
23
KOPS operates off of a config spec file that is generated during the create phase. It is uploaded to the amazon s3 bucket that is passed in during create.
34

45
If you download the config spec file on a running cluster that is configured the way you like it, you can just pass that config spec file in to the create command and have kops create the cluster for you , `kops create -f spec_file` in a completely unattended manor.
56

6-
## How to download the config spec file. ( 2 possible ways )
7-
8-
Let's say you create your cluster with the following configuration options:
7+
Let us say you create your cluster with the following configuration options:
98

109
```
11-
declare -x KOPS_STATE_STORE=s3://k8s-us-west
12-
declare -x CLOUD=aws
13-
declare -x ZONE="us-west-1a"
14-
declare -x MASTER_ZONES="us-west-1a"
15-
declare -x NAME=westtest.c.foo.com
16-
declare -x K8S_VERSION=1.4.6
17-
declare -x NETWORKCIDER="10.240.0.0/16"
18-
declare -x MASTER_SIZE="t2.medium"
19-
declare -x WORKER_SIZE="t2.large"
10+
export KOPS_STATE_STORE=s3://k8s-us-west
11+
export CLOUD=aws
12+
export ZONE="us-west-1a"
13+
export MASTER_ZONES="us-west-1a"
14+
export NAME=k8s.example.com
15+
export K8S_VERSION=1.6.4
16+
export NETWORKCIDER="10.240.0.0/16"
17+
export MASTER_SIZE="m3.large"
18+
export WORKER_SIZE="m4.large"
2019
```
2120
Next you call the kops command to create the cluster in your terminal:
2221

2322
```
24-
kops create cluster $NAME \
25-
--cloud=$CLOUD \
26-
--zones="$ZONE" \
27-
--kubernetes-version=$K8S_VERSION \
28-
--master-zones="$MASTER_ZONES" \
29-
--node-count=3 \
30-
--node-size="$WORKER_SIZE" \
31-
--master-size="$MASTER_SIZE" \
32-
--network-cidr=${NETWORKCIDER} \
33-
--dns-zone=ZVO7KL181S5AP \
34-
--ssh-public-key=/Users/foo/.ssh/lab_no_password.pub
23+
kops create cluster $NAME \
24+
--cloud=$CLOUD \
25+
--zones="$ZONE" \
26+
--kubernetes-version=$K8S_VERSION \
27+
--master-zones="$MASTER_ZONES" \
28+
--node-count=3 \
29+
--node-size="$WORKER_SIZE" \
30+
--master-size="$MASTER_SIZE" \
31+
--network-cidr=${NETWORKCIDER} \
32+
--dns-zone=ZVO7KL181S5AP \
33+
--ssh-public-key=$HOME/.ssh/lab_no_password.pub
3534
```
3635

37-
### Method One - Kops command
36+
## kops command
3837

39-
You can simply use the kops command `kops get cluster -o yaml > a_fun_name_you_will_remember.yml`
38+
You can simply use the kops command `kops get --name $NAME -o yaml > a_fun_name_you_will_remember.yml`
4039

41-
Note: for the above command to work the cluster NAME and the KOPS_STATE_STORE will have to be exported in your environment.
40+
Note: for the above command to work the cluster NAME and the KOPS_STATE_STORE will have to be exported in your environment.
4241

43-
### Method Two - Manual method directly from s3
42+
For more information on how to use and modify the configurations see (here)[manifests_and_customizing_via_api.md].
4443

45-
Your spec file will be located in your s3 bucket, in the location `s3://k8s-us-west/$NAME/config`. Using the above as an example the config file is located at `s3://k8s-us-west/westtest.c.foo.com/config`
44+
## Managing instance groups
4645

47-
To download this file via the aws cli you can use the aws s3 copy command. Using the above cluster as an example the command would be
48-
49-
`aws s3 cp $KOPS_STATE_STORE/$NAME/config ~/a_fun_name_you_will_remember.yml`
46+
You can also manage instance groups in seperate YAML files as well. The command `kops get --name $NAME -o yaml > $NAME.yml` exports the entire clsuter. An option is to have a YAML file for the cluster, and individual YAML files for the instance groups. This allows you to do stuff like:
5047

48+
```shell
49+
if ! kops get cluster --name "$NAME"; then
50+
kops create -f "kops/$CLUSTER/$REGION.yaml"
51+
else
52+
kops replace -f "kops/$CLUSTER/$REGION.yaml"
53+
fi
5154

55+
for ig in kops/$CLUSTER/instancegroup/*; do
56+
if ! kops get ig --name "$NAME" "$(basename "$ig")"; then
57+
kops create -f "$ig"
58+
else
59+
kops replace -f "$ig"
60+
fi
61+
done
62+
```

0 commit comments

Comments
 (0)