Skip to content

Commit 61577a2

Browse files
authored
Merge branch 'master' into foxish-fix-link
2 parents ee5b5ee + b437322 commit 61577a2

File tree

12 files changed

+234
-29
lines changed

12 files changed

+234
-29
lines changed

_data/guides.yml

+2
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ toc:
252252
path: /docs/admin/
253253
- title: Cluster Management Guide
254254
path: /docs/admin/cluster-management/
255+
- title: kubeadm reference
256+
path: /docs/admin/kubeadm/
255257
- title: Installing Addons
256258
path: /docs/admin/addons/
257259
- title: Sharing a Cluster with Namespaces

_data/tutorials.yml

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ toc:
44
path: /docs/tutorials/
55
- title: Kubernetes Basics
66
section:
7+
- title: Overview
8+
path: /docs/tutorials/kubernetes-basics/
79
- title: 1. Create a Cluster
810
section:
911
- title: Using Minikube to Create a Cluster

docs/admin/accessing-the-api.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ On GCE, Client Certificates, Password, Plain Tokens, and JWT Tokens are all enab
5252
If the request cannot be authenticated, it is rejected with HTTP status code 401.
5353
Otherwise, the user is authenticated as a specific `username`, and the user name
5454
is available to subsequent steps to use in their decisions. Some authenticators
55-
may also provide the group memberships of the user, while other authenticators
56-
do not (and expect the authorizer to determine these).
55+
also provide the group memberships of the user, while other authenticators
56+
do not.
5757

5858
While Kubernetes uses "usernames" for access control decisions and in request logging,
5959
it does not have a `user` object nor does it store usernames or other information about

docs/admin/authorization.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ A request has the following attributes that can be considered for authorization:
5353
- what resource is being accessed (for resource requests only)
5454
- what subresource is being accessed (for resource requests only)
5555
- the namespace of the object being accessed (for namespaced resource requests only)
56-
- the API group being accessed (for resource requests only)
56+
- the API group being accessed (for resource requests only); an empty string designates the [core API group](../api.md#api-groups)
5757

5858
The request verb for a resource API endpoint can be determined by the HTTP verb used and whether or not the request acts on an individual resource or a collection of resources:
5959

@@ -231,7 +231,7 @@ metadata:
231231
namespace: default
232232
name: pod-reader
233233
rules:
234-
- apiGroups: [""] # The API group "" indicates the default API Group.
234+
- apiGroups: [""] # The API group "" indicates the core API Group.
235235
resources: ["pods"]
236236
verbs: ["get", "watch", "list"]
237237
nonResourceURLs: []
@@ -632,4 +632,4 @@ subjectaccessreview "" created
632632
```
633633

634634
This is useful for debugging access problems, in that you can use this resource
635-
to determine what access an authorizer is granting.
635+
to determine what access an authorizer is granting.

docs/admin/kubeadm.md

+150
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
---
2+
assignees:
3+
- mikedanese
4+
- luxas
5+
- errordeveloper
6+
7+
---
8+
9+
10+
This document provides information on how to use kubeadm's advanced options.
11+
12+
Running kubeadm init bootstraps a Kubernetes cluster. This consists of the
13+
following steps:
14+
15+
1. kubeadm generates a token that additional nodes can use to register themselves
16+
with the master in future.
17+
18+
1. kubeadm generates a self-signed CA using openssl to provision identities
19+
for each node in the cluster, and for the API server to secure communication
20+
with clients.
21+
22+
1. Outputting a kubeconfig file for the kubelet to use to connect to the API server,
23+
as well as an additional kubeconfig file for administration.
24+
25+
1. kubeadm generates Kubernetes resource manifests for the API server, controller manager
26+
and scheduler, and placing them in `/etc/kubernetes/manifests`. The kubelet watches
27+
this directory for static resources to create on startup. These are the core
28+
components of Kubernetes, and once they are up and running we can use `kubectl`
29+
to set up/manage any additional components.
30+
31+
1. kubeadm installs any add-on components, such as DNS or discovery, via the API server.
32+
33+
## Usage
34+
35+
Fields that support multiple values do so either with comma separation, or by specifying
36+
the flag multiple times.
37+
38+
### `kubeadm init`
39+
40+
It is usually sufficient to run `kubeadm init` without any flags,
41+
but in some cases you might like to override the default behaviour.
42+
Here we specify all the flags that can be used to customise the Kubernetes
43+
installation.
44+
45+
- `--api-advertise-addresses` (multiple values are allowed)
46+
- `--api-external-dns-names` (multiple values are allowed)
47+
48+
By default, `kubeadm init` automatically detects IP addresses and uses
49+
these to generate certificates for the API server. This uses the IP address
50+
of the default network interface. If you would like to access the API server
51+
through a different IP address, or through a hostname, you can override these
52+
defaults with `--api-advertise-addresses` and `--api-external-dns-names`.
53+
For example, to generate certificates that verify the API server at addresses
54+
`10.100.245.1` and `100.123.121.1`, you could use
55+
`--api-advertise-addresses=10.100.245.1,100.123.121.1`. To allow it to be accessed
56+
with a hostname, `--api-external-dns-names=kubernetes.example.com,kube.example.com`
57+
Specifying `--api-advertise-addresses` disables auto detection of IP addresses.
58+
59+
- `--cloud-provider`
60+
61+
Currently, `kubeadm init` does not provide autodetection of cloud provider.
62+
This means that load balancing and persistent volumes are not supported out
63+
of the box. You can specify a cloud provider using `--cloud-provider`.
64+
Valid values are the ones supported by `controller-manager`, namely `"aws"`,
65+
`"azure"`, `"cloudstack"`, `"gce"`, `"mesos"`, `"openstack"`, `"ovirt"`,
66+
`"rackspace"`, `"vsphere"`. In order to provide additional configuration for
67+
the cloud provider, you should create a `/etc/kubernetes/cloud-config.json`
68+
file manually, before running `kubeadm init`. `kubeadm` automatically
69+
picks those settings up and ensures other nodes are configured correctly.
70+
You must also set the `--cloud-provider` and `--cloud-config` parameters
71+
yourself by editing the `/etc/systemd/system/kubelet.service.d/10-kubeadm.conf`
72+
file appropriately.
73+
74+
- `--external-etcd-cafile` etcd certificate authority file
75+
- `--external-etcd-endpoints` (multiple values are allowed)
76+
- `--external-etcd-certfile` etcd client certificate file
77+
- `--external-etcd-keyfile` etcd client key file
78+
79+
By default, `kubeadm` deploys a single node etcd cluster on the master
80+
to store Kubernetes state. This means that any failure on the master node
81+
requires you to rebuild your cluster from scratch. Currently `kubeadm init`
82+
does not support automatic deployment of a highly available etcd cluster.
83+
If you would like to use your own etcd cluster, you can override this
84+
behaviour with `--external-etcd-endpoints`. `kubeadm` supports etcd client
85+
authentication using the `--external-etcd-cafile`, `--external-etcd-certfile`
86+
and `--external-etcd-keyfile` flags.
87+
88+
- `--pod-network-cidr`
89+
90+
By default, `kubeadm init` does not set node CIDR's for pods and allows you to
91+
bring your own networking configuration through a CNI compatible network
92+
controller addon such as [Weave Net](https://github.com/weaveworks/weave-kube),
93+
[Calico](https://github.com/projectcalico/calico-containers/tree/master/docs/cni/kubernetes/manifests/kubeadm)
94+
or [Canal](https://github.com/tigera/canal/tree/master/k8s-install/kubeadm).
95+
If you are using a compatible cloud provider or flannel, you can specify a
96+
subnet to use for each pod on the cluster with the `--pod-network-cidr` flag.
97+
This should be a minimum of a /16 so that kubeadm is able to assign /24 subnets
98+
to each node in the cluster.
99+
100+
- `--service-cidr` (default '10.12.0.0/12')
101+
102+
You can use the `--service-cidr` flag to override the subnet Kubernetes uses to
103+
assign pods IP addresses. If you do, you will also need to update the
104+
`/etc/systemd/system/kubelet.service.d/10-kubeadm.conf` file to reflect this change
105+
else DNS will not function correctly.
106+
107+
- `--service-dns-domain` (default 'cluster.local')
108+
109+
By default, `kubeadm init` deploys a cluster that assigns services with DNS names
110+
`<service_name>.<namespace>.svc.cluster.local`. You can use the `--service-dns-domain`
111+
to change the DNS name suffix. Again, you will need to update the
112+
`/etc/systemd/system/kubelet.service.d/10-kubeadm.conf` file accordingly else DNS will
113+
not function correctly.
114+
115+
- `--token`
116+
117+
By default, `kubeadm init` automatically generates the token used to initialise
118+
each new node. If you would like to manually specify this token, you can use the
119+
`--token` flag. The token must be of the format '<6 character string>.<16 character string>'.
120+
121+
- `--use-kubernetes-version` (default 'v1.4.1') the kubernetes version to initialise
122+
123+
`kubeadm` was originally built for Kubernetes version **v1.4.0**, older versions are not
124+
supported. With this flag you can try any future version, e.g. **v1.5.0-beta.1**
125+
whenever it comes out (check [releases page](https://github.com/kubernetes/kubernetes/releases)
126+
for a full list of available versions).
127+
128+
### `kubeadm join`
129+
130+
`kubeadm join` has one mandatory flag, the token used to secure cluster bootstrap,
131+
and one mandatory argument, the master IP address.
132+
133+
Here's an example on how to use it:
134+
135+
`kubeadm join --token=the_secret_token 192.168.1.1`
136+
137+
- `--token=<token>`
138+
139+
By default, when `kubeadm init` runs, a token is generated and revealed in the output.
140+
That's the token you should use here.
141+
142+
## Troubleshooting
143+
144+
* Some users on RHEL/CentOS 7 have reported issues with traffic being routed incorrectly due to iptables being bypassed. You should ensure `net.bridge.bridge-nf-call-iptables` is set to 1 in your sysctl config, eg.
145+
146+
```
147+
# cat /etc/sysctl.d/k8s.conf
148+
net.bridge.bridge-nf-call-ip6tables = 1
149+
net.bridge.bridge-nf-call-iptables = 1
150+
```

docs/getting-started-guides/kubeadm.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ As an example, install a sample microservices application, a socks shop, to put
178178
To learn more about the sample microservices app, see the [GitHub README](https://github.com/microservices-demo/microservices-demo).
179179

180180
# git clone https://github.com/microservices-demo/microservices-demo
181-
# kubectl apply -f microservices-demo/deploy/kubernetes/manifests
181+
# kubectl apply -f microservices-demo/deploy/kubernetes/manifests/sock-shop-ns.yml -f microservices-demo/deploy/kubernetes/manifests
182182

183183
You can then find out the port that the [NodePort feature of services](/docs/user-guide/services/) allocated for the front-end service by running:
184184

@@ -211,6 +211,7 @@ See the [list of add-ons](/docs/admin/addons/) to explore other add-ons, includi
211211

212212
* Learn more about [Kubernetes concepts and kubectl in Kubernetes 101](/docs/user-guide/walkthrough/).
213213
* Install Kubernetes with [a cloud provider configurations](/docs/getting-started-guides/) to add Load Balancer and Persistent Volume support.
214+
* Learn about `kubeadm`'s advanced usage on the [advanced reference doc](/docs/admin/kubeadm/)
214215

215216

216217
## Cleanup

docs/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ h2, h3, h4 {
7777
<a href="/docs/whatisk8s/" class="button">Read the Overview</a>
7878
</div>
7979
<div class="col3rd">
80-
<h3>Hello World on Google Container Engine</h3>
81-
<p>In this quickstart, we’ll be creating a Kubernetes instance that stands up a simple “Hello World” app using Node.js. In just a few minutes you'll go from zero to deployed Kubernetes app on Google Container Engine (GKE), a hosted service from Google.</p>
82-
<a href="/docs/hellonode/" class="button">Get Started on GKE</a>
80+
<h3>Kubernetes Basics Interactive Tutorial</h3>
81+
<p>The Kubernetes Basics interactive tutorials let you try out Kubernetes features using Minikube right out of your web browser in a virtual terminal. Learn about the Kubernetes system and deploy, expose, scale, and upgrade a containerized application in just a few minutes.</p>
82+
<a href="/docs/tutorials/kubernetes-basics/" class="button">Try the Interactive Tutorials</a>
8383
</div>
8484
<div class="col3rd">
8585
<h3>Installing Kubernetes on Linux with kubeadm</h3>

docs/tutorials/index.md

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33

44
The Tutorials section of the Kubernetes documentation is a work in progress.
55

6+
#### Kubernetes Basics
7+
8+
* [Kubernetes Basics](/docs/tutorials/kubernetes-basics/) is an in-depth interactive tutorial that helps you understand the Kubernetes system and try out some basic Kubernetes features.
9+
610
#### Stateless Applications
711

812
* [Running a Stateless Application Using a Deployment](/docs/tutorials/stateless-application/run-stateless-application-deployment/)

docs/tutorials/kubernetes-basics/index.html

+19-11
Original file line numberDiff line numberDiff line change
@@ -15,66 +15,74 @@
1515

1616
<div class="row">
1717
<div class="col-md-9">
18-
<h2>Getting Started with Kubernetes</h2>
19-
<p><i style="color: #3771e3;">By the end of this tutorial you will understand what Kubernetes does. You will also learn how to deploy, scale, update and debug containerized applications on a Kubernetes cluster using an interactive online terminal.</i></p>
18+
<h2>Kubernetes Basics</h2>
19+
<p>This tutorial provides a walkthrough of the basics of the Kubernetes cluster orchestration system. Each module contains some background information on major Kubernetes features and concepts, and includes an interactive online tutorial. These interactive tutorials let you manage a simple cluster and its containerized applications for yourself.</p>
20+
<p>Using the interactive tutorials, you can learn to:</p>
21+
<ul>
22+
<li>Deploy a containerized application on a cluster</li>
23+
<li>Scale the deployment</li>
24+
<li>Update the containerized application with a new software version</li>
25+
<li>Debug the containerized application</li>
26+
</ul>
27+
<p>The tutorials use Katacoda to run a virtual terminal in your web browser that runs Minikube, a small-scale local deployment of Kubernetes that can run anywhere. There's no need to install any software or configure anything; each interactive tutorial runs directly out of your web browser itself.</p>
2028
</div>
2129
</div>
2230

2331
<br>
2432

2533
<div class="row">
2634
<div class="col-md-9">
27-
<h2>Why Kubernetes?</h2>
28-
<p>Today users expect applications to be available 24/7, while developers expect to deploy new versions of those applications several times a day. The way we build software is moving in this direction, enabling applications to be released and updated in an easy and fast way without downtime. We also need to be able to scale application in line with the user demand and we expect them to make intelligent use of the available resources. <a href="http://kubernetes.io/docs/whatisk8s/">Kubernetes</a> is a platform designed to meet those requirements, using the experience accumulated by Google in this area, combined with best-of-breed ideas from the community.</p>
35+
<h2>What can Kubernetes do for you?</h2>
36+
<p>With modern web services, users expect applications to be available 24/7, and developers expect to deploy new versions of those applications several times a day. Containzerization helps package software to serve these goals, enabling applications to be released and updated in an easy and fast way without downtime. Kubernetes helps you make sure those containerized applications run where and when you want, and helps them find the resources and tools they need to work. <a href="http://kubernetes.io/docs/whatisk8s/">Kubernetes</a> is a production-ready, open source platform designed with the Google's accumulated experience in container orchestration, combined with best-of-breed ideas from the community.</p>
2937
</div>
3038
</div>
3139

3240
<div class="content__modules">
33-
<h2>Getting Started Modules</h2>
41+
<h2>Kubernetes Basics Modules</h2>
3442
<div class="row">
3543
<div class="col-md-4">
3644
<div class="thumbnail">
37-
<a href="/docs/tutorials/kubernetes-basics/create-cluster.html"><img src="./public/images/module_01.svg?v=1469803628347" alt=""></a>
45+
<a href="/docs/tutorials/kubernetes-basics/cluster-intro.html"><img src="./public/images/module_01.svg?v=1469803628347" alt=""></a>
3846
<div class="caption">
3947
<a href="1-0.html"><h5>1. Create a Kubernetes cluster</h5></a>
4048
</div>
4149
</div>
4250
</div>
4351
<div class="col-md-4">
4452
<div class="thumbnail">
45-
<a href="/docs/tutorials/kubernetes-basics/deploy-app.html"><img src="./public/images/module_02.svg?v=1469803628347" alt=""></a>
53+
<a href="/docs/tutorials/kubernetes-basics/deploy-intro.html"><img src="./public/images/module_02.svg?v=1469803628347" alt=""></a>
4654
<div class="caption">
4755
<a href="2-0.html"><h5>2. Deploy an app</h5></a>
4856
</div>
4957
</div>
5058
</div>
5159
<div class="col-md-4">
5260
<div class="thumbnail">
53-
<a href="/docs/tutorials/kubernetes-basics/explore-app.html"><img src="./public/images/module_03.svg?v=1469803628347" alt=""></a>
61+
<a href="/docs/tutorials/kubernetes-basics/explore-intro.html"><img src="./public/images/module_03.svg?v=1469803628347" alt=""></a>
5462
<div class="caption">
5563
<a href="3-0.html"><h5>3. Explore your app</h5></a>
5664
</div>
5765
</div>
5866
</div>
5967
<div class="col-md-4">
6068
<div class="thumbnail">
61-
<a href="/docs/tutorials/kubernetes-basics/expose-app.html"><img src="./public/images/module_04.svg?v=1469803628347" alt=""></a>
69+
<a href="/docs/tutorials/kubernetes-basics/expose-intro.html"><img src="./public/images/module_04.svg?v=1469803628347" alt=""></a>
6270
<div class="caption">
6371
<a href="4-0.html"><h5>4. Expose your app publicly</h5></a>
6472
</div>
6573
</div>
6674
</div>
6775
<div class="col-md-4">
6876
<div class="thumbnail">
69-
<a href="/docs/tutorials/kubernetes-basics/scale-app.html"><img src="./public/images/module_05.svg?v=1469803628347" alt=""></a>
77+
<a href="/docs/tutorials/kubernetes-basics/scale-intro.html"><img src="./public/images/module_05.svg?v=1469803628347" alt=""></a>
7078
<div class="caption">
7179
<a href="5-0.html"><h5>5. Scale up your app</h5></a>
7280
</div>
7381
</div>
7482
</div>
7583
<div class="col-md-4">
7684
<div class="thumbnail">
77-
<a href="/docs/tutorials/kubernetes-basics/update-app.html"><img src="./public/images/module_06.svg?v=1469803628347" alt=""></a>
85+
<a href="/docs/tutorials/kubernetes-basics/update-intro.html"><img src="./public/images/module_06.svg?v=1469803628347" alt=""></a>
7886
<div class="caption">
7987
<a href="6-0.html"><h5>6. Update your app</h5></a>
8088
</div>

0 commit comments

Comments
 (0)