You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# The master also proxies the services so that they are accessible from outside
258
252
# The -L flag is there because curl has to follow redirects
@@ -272,14 +266,10 @@ kubectl cluster-info
272
266
# cAdvisor in kubelet provides a web site that outputs all kind of stats in real time
273
267
# http://$MASTER_IP:4194
274
268
275
-
# Disable this node. This always reverts the "kube-config enable-*" commands
276
-
kube-config disable-node
277
-
278
-
# Remove the data for the cluster
279
-
kube-config delete-data
269
+
# Turndown Kubernetes on this node. This always reverts the "kube-config enable-*" commands
270
+
kube-config disable
280
271
```
281
272
282
-
283
273
## Addons
284
274
285
275
To enable/disable addons is very easy: `kube-config enable-addon [addon-name]` and `kube-config disable-addon [addon-name]`
@@ -293,26 +283,28 @@ Three addons are available for the moment:
293
283
- Example: `my-awesome-webserver.default.svc.cluster.local` or just `my-awesome-webserver` may resolve to ip `10.0.0.154`
294
284
- Those DNS names is available both in containers and on the node itself (kube-config automatically adds the info to `/etc/resolv.conf`)
295
285
- If you want to access the Kubernetes API easily, `curl -k https://kubernetes` or `curl -k https://10.0.0.1` if you remember numbers better (`-k` stands for insecure as apiserver has no signed certs by default)
296
-
- The DNS server itself has allocated ip `10.0.0.10` by default
297
-
- The DNS domain is `cluster.local` by default
298
-
- Central image registry:
299
-
- A registry for storing cluster images if e.g. the cluster has no internet connection for a while
300
-
- Or for cluster-specific images that one not want to publish on Docker Hub
301
-
- This service is available at this address: `registry.kube-system` when DNS is enabled
302
-
- Just tag your image: `docker tag my-name/my-image registry.kube-system:5000/my-name/my-image`
303
-
- And push it to the registry: `docker push registry.kube-system:5000/my-name/my-image`
286
+
- The DNS server itself has allocated ip `10.0.0.10`
287
+
- The DNS domain is `cluster.local`
288
+
- This addon can't be disabled.
304
289
- Kubernetes Dashboard:
305
290
- The Kubernetes Dashboard project [is here](https://github.com/kubernetes/dashboard)
306
-
- Replaces `kube-ui`
307
291
- Access the dashboard on: `http://[master-ip]:8080/ui`
308
-
- The Service Loadbalancer:
292
+
- This addon can't be disabled.
293
+
- Central image registry:
294
+
- A registry for storing cluster images if e.g. the cluster has no internet connection for a while
295
+
- Or for cluster-specific images that one not want to publish on Docker Hub
296
+
- This service is available at `localhost:5000` on all nodes, which by default is a "trusted" location.
297
+
-`localhost:5000` forwards the traffic to the internal IP of the registry service.
298
+
- Just tag your image: `docker tag my-name/my-image localhost:5000/my-name/my-image`
299
+
- And push it to the registry: `docker push localhost:5000/my-name/my-image`
- You have to label at least one node `role=loadbalancer` like this: `kubectl label no [node_ip] role=loadbalancer`
311
303
- The loadbalancer will expose http services in the default namespace on `http://[loadbalancer_ip]/[service_name]`. Only `http` services on port 80 are tested in this release. It should be pretty easy to add `https` support though.
312
304
- You may see `haproxy` stats on `http://[loadbalancer_ip]:1936`
313
-
-More info will come later
305
+
-Not recommended for heavy use. Will be replaced with ingress in coming releases.
314
306
- Cluster monitoring with heapster, influxdb and grafana
315
-
- When running this addon (`heapster`), the Dashboard will show usage graphs in the CPU and RAM columns.
307
+
- When this addon is enabled, the dashboard will show usage graphs in the CPU and RAM columns.
316
308
- All heapster data is stored in an InfluxDB database. Data is written once a minute. Access the graphical InfluxDB UI: `http://[master-ip]:8080/api/v1/proxy/namespaces/kube-system/services/monitoring-influxdb:http` and the raw api on: `http://[master-ip]:8080/api/v1/proxy/namespaces/kube-system/services/monitoring-influxdb:api`
317
309
- A nice `grafana` web dashboard that shows resource usage for the whole cluster as for individual pods is accessible at: `http://[master-ip]:8080/api/v1/proxy/namespaces/kube-system/services/monitoring-grafana`. It may take some minutes for data to show up.
318
310
@@ -328,8 +320,8 @@ Here is some ways to make your outside devices reach the services running in the
328
320
- Connect a computer to the `flannel` network
329
321
- It's possible to start `flannel` and `kube-proxy` on another computer **in the same network** and access all services
330
322
- Run these two commands from a `amd64` machine with docker:
331
-
-`docker run --net=host -d --privileged -v /dev/net:/dev/net quay.io/coreos/flannel:0.5.5 /opt/bin/flanneld --etcd-endpoints=http://$MASTER_IP:4001`
332
-
-`docker run --net=host -d --privileged gcr.io/google_containers/hyperkube-amd64:v1.2.0 /hyperkube proxy --master=http://$MASTER_IP:8080 --v=2`'
323
+
-`docker run --net=host -d --privileged -v /dev/net:/dev/net quay.io/coreos/flannel:0.6.1-amd64 /opt/bin/flanneld --etcd-endpoints=http://$MASTER_IP:2379`
324
+
-`docker run --net=host -d --privileged gcr.io/google_containers/hyperkube-amd64:v1.3.6 /hyperkube proxy --master=http://$MASTER_IP:8080 --v=2`'
333
325
- Replace $MASTER_IP with the actual ip of your master node
334
326
- The consuming `amd64` computer can access all services
335
327
- For example: `curl -k https://10.0.0.1`
@@ -348,39 +340,23 @@ Go to a web browser and type: `{IP of your node}:4194` and a nice dashboard will
348
340
349
341
There is a configuration file: `/etc/kubernetes/k8s.conf`, where you can customize some things:
350
342
-`K8S_MASTER_IP`: Points to the master in the cluster. If the node is master, it uses `127.0.0.1` (aka `localhost`). Default: `127.0.0.1`
351
-
-`FLANNEL_SUBNET`: The subnet `flannel` should use. [More information](https://github.com/coreos/flannel#configuration). Default: `10.1.0.0/16`
352
-
-`FLANNEL_BACKEND`: The backend `flannel` will use to proxy packets from one node to another. [More information](https://github.com/coreos/flannel#configuration). Default: `host-gw`, which requires Layer 2 connectivity between nodes.
353
-
-`DNS_IP`: The IP the DNS addon will allocate. Defaults to: `10.0.0.10`. Do not change this unless you have a good reason.
354
-
-`DNS_DOMAIN`: The domain for DNS names. Defaults to: `cluster.local`. If you for example changes this to `abc`, your DNS names will look like this: `my-nginx.default.svc.abc`.
355
-
-`DOCKER_STORAGE_DRIVER`: The storage driver all docker daemons will use. Note: You shouldn't change this after the installation.
356
-
357
-
**Note:** You must change the values in `k8s.conf` before starting Kubernetes. Otherwise they won't have effect, just be able to harm your setup. And remember that if you change `DNS_IP` and `DNS_DOMAIN` on one node, you'll have to change them on all nodes in the cluster
343
+
- The other options comes from [docker-multinode](https://github.com/kubernetes/kube-deploy/tree/master/docker-multinode#optionsconfiguration)
358
344
345
+
**Note:** You must change the values in `k8s.conf` before starting Kubernetes. Otherwise they won't have effect, just be able to harm your setup.
359
346
360
347
On Arch Linux, this file will override the default `eth0` settings. If you have a special `eth0` setup (or use some other network), edit this file to fit your use case: `/etc/systemd/network/dns.network`
361
348
362
349
## Docker versions
363
350
364
-
With release `v0.6.5` and higher, only `docker-1.10.0` and higher is supported.
365
-
366
-
## Cross-compiling
367
-
368
-
For this project, I compile the binaries on ARM hosts. But I've also made a script that can cross-compile if you want to compile it faster. [Check it out](scripts/build-k8s-on-amd64/Dockerfile)
369
-
370
-
## Running tests
371
-
372
-
Right now there is one test:
373
-
-`run-test master` will simply do what the `Use Kubernetes` section does. It setups a master, runs `nginx`, starts the DNS, registry and sleep addons.
374
-
375
-
Logs can be found at: `/etc/kubernetes/source/scripts/logs`
376
-
The tests can be found at: `/etc/kubernetes/source/scripts/tests`
377
-
The test might fail, although the thing it's testing is in fact working. Report an issue in that case.
351
+
Only `docker-1.10` and higher is supported, `docker-1.11` is recommended.
378
352
379
353
## Troubleshooting
380
354
381
-
If your cluster won't start, try `kube-config delete-data`. That will remove all data you store in `/var/lib/kubelet` and `/var/lib/kubernetes`. If you don't want to delete all data, but have to get Kubernetes up and running, you can answer `M`, when running `kube-config delete-data` and it will rename `/var/lib/kubernetes` and `/var/lib/kubelet` to `/var/lib/kubernetesold` and `/var/lib/kubeletold` so you may restore them later.
355
+
If your cluster won't start, try `kube-config disable` and choose to remove `/var/lib/kubelet`. That will remove all data you store in `/var/lib/kubelet` and kill most running docker images.
356
+
357
+
## Reboots
382
358
383
-
There is also no guarantee that the master/workers and all their services will come up successfully after a reboot, but it's possible.
359
+
Will **not** work in this version. It's in the roadmap to enable reboots again.
0 commit comments