Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -106,7 +106,7 @@ EC2 with user data (cloud-config).
|
||||
### Command line administration tool: `kubectl`
|
||||
|
||||
The cluster startup script will leave you with a `kubernetes` directory on your workstation.
|
||||
Alternately, you can download the latest Kubernetes release from [this page](https://github.com/GoogleCloudPlatform/kubernetes/releases).
|
||||
Alternately, you can download the latest Kubernetes release from [this page](https://github.com/kubernetes/kubernetes/releases).
|
||||
|
||||
Next, add the appropriate binary folder to your `PATH` to access kubectl:
|
||||
|
||||
|
@@ -76,7 +76,7 @@ You can create a virtual network:
|
||||
|
||||
Now you're ready.
|
||||
|
||||
You can download and install the latest Kubernetes release from [this page](https://github.com/GoogleCloudPlatform/kubernetes/releases), then run the `<kubernetes>/cluster/kube-up.sh` script to start the cluster:
|
||||
You can download and install the latest Kubernetes release from [this page](https://github.com/kubernetes/kubernetes/releases), then run the `<kubernetes>/cluster/kube-up.sh` script to start the cluster:
|
||||
|
||||
cd kubernetes
|
||||
cluster/kube-up.sh
|
||||
|
@@ -37,7 +37,7 @@ You can either build a release from sources or download a pre-built release. If
|
||||
|
||||
### Prebuilt Binary Release
|
||||
|
||||
The list of binary releases is available for download from the [GitHub Kubernetes repo release page](https://github.com/GoogleCloudPlatform/kubernetes/releases).
|
||||
The list of binary releases is available for download from the [GitHub Kubernetes repo release page](https://github.com/kubernetes/kubernetes/releases).
|
||||
|
||||
Download the latest release and unpack this tar file on Linux or OS X, cd to the created `kubernetes/` directory, and then follow the getting started guide for your cloud.
|
||||
|
||||
@@ -48,7 +48,7 @@ Get the Kubernetes source. If you are simply building a release from source the
|
||||
Building a release is simple.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/GoogleCloudPlatform/kubernetes.git
|
||||
git clone https://github.com/kubernetes/kubernetes.git
|
||||
cd kubernetes
|
||||
make release
|
||||
```
|
||||
|
@@ -57,7 +57,7 @@ In this guide I will demonstrate how to deploy a Kubernetes cluster to Azure clo
|
||||
To get started, you need to checkout the code:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/GoogleCloudPlatform/kubernetes
|
||||
git clone https://github.com/kubernetes/kubernetes
|
||||
cd kubernetes/docs/getting-started-guides/coreos/azure/
|
||||
```
|
||||
|
||||
|
@@ -63,7 +63,7 @@ In the next few steps you will be asked to configure these files and host them o
|
||||
To get the Kubernetes source, clone the GitHub repo, and build the binaries.
|
||||
|
||||
```
|
||||
git clone https://github.com/GoogleCloudPlatform/kubernetes.git
|
||||
git clone https://github.com/kubernetes/kubernetes.git
|
||||
cd kubernetes
|
||||
./build/release.sh
|
||||
```
|
||||
|
@@ -412,7 +412,7 @@ On the PXE server make and fill in the variables `vi /var/www/html/coreos/pxe-cl
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes API Server
|
||||
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
||||
Documentation=https://github.com/kubernetes/kubernetes
|
||||
Requires=etcd.service
|
||||
After=etcd.service
|
||||
[Service]
|
||||
@@ -432,7 +432,7 @@ On the PXE server make and fill in the variables `vi /var/www/html/coreos/pxe-cl
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes Controller Manager
|
||||
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
||||
Documentation=https://github.com/kubernetes/kubernetes
|
||||
Requires=kube-apiserver.service
|
||||
After=kube-apiserver.service
|
||||
[Service]
|
||||
@@ -448,7 +448,7 @@ On the PXE server make and fill in the variables `vi /var/www/html/coreos/pxe-cl
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes Scheduler
|
||||
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
||||
Documentation=https://github.com/kubernetes/kubernetes
|
||||
Requires=kube-apiserver.service
|
||||
After=kube-apiserver.service
|
||||
[Service]
|
||||
@@ -579,7 +579,7 @@ On the PXE server make and fill in the variables `vi /var/www/html/coreos/pxe-cl
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes Proxy
|
||||
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
||||
Documentation=https://github.com/kubernetes/kubernetes
|
||||
Requires=setup-network-environment.service
|
||||
After=setup-network-environment.service
|
||||
[Service]
|
||||
@@ -595,7 +595,7 @@ On the PXE server make and fill in the variables `vi /var/www/html/coreos/pxe-cl
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes Kubelet
|
||||
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
||||
Documentation=https://github.com/kubernetes/kubernetes
|
||||
Requires=setup-network-environment.service
|
||||
After=setup-network-environment.service
|
||||
[Service]
|
||||
|
@@ -74,6 +74,14 @@ This pattern is necessary because the `flannel` daemon is responsible for settin
|
||||
all of the Docker containers created by Kubernetes. To achieve this, it must run outside of the _main_ Docker daemon. However,
|
||||
it is still useful to use containers for deployment and management, so we create a simpler _bootstrap_ daemon to achieve this.
|
||||
|
||||
You can specify k8s version on very node before install:
|
||||
|
||||
```
|
||||
export K8S_VERSION=<your_k8s_version (e.g. 1.0.3)>
|
||||
```
|
||||
|
||||
Otherwise, we'll use latest `hyperkube` image as default k8s version.
|
||||
|
||||
## Master Node
|
||||
|
||||
The first step in the process is to initialize the master node.
|
||||
@@ -81,7 +89,6 @@ The first step in the process is to initialize the master node.
|
||||
Clone the Kubernetes repo, and run [master.sh](docker-multinode/master.sh) on the master machine with root:
|
||||
|
||||
```sh
|
||||
export K8S_VERSION=<your_k8s_version (e.g. 1.0.1)>
|
||||
cd kubernetes/docs/getting-started-guides/docker-multinode/
|
||||
./master.sh
|
||||
```
|
||||
@@ -97,7 +104,6 @@ Once your master is up and running you can add one or more workers on different
|
||||
Clone the Kubernetes repo, and run [worker.sh](docker-multinode/worker.sh) on the worker machine with root:
|
||||
|
||||
```sh
|
||||
export K8S_VERSION=<your_k8s_version (e.g. 1.0.1)>
|
||||
export MASTER_IP=<your_master_ip (e.g. 1.2.3.4)>
|
||||
cd kubernetes/docs/getting-started-guides/docker-multinode/
|
||||
./worker.sh
|
||||
|
@@ -193,7 +193,7 @@ NAME LABELS STATUS
|
||||
```
|
||||
|
||||
If the status of the node is `NotReady` or `Unknown` please check that all of the containers you created are successfully running.
|
||||
If all else fails, ask questions on IRC at [#google-containers](http://webchat.freenode.net/?channels=google-containers).
|
||||
If all else fails, ask questions on [Slack](../../troubleshooting.md#slack).
|
||||
|
||||
|
||||
### Next steps
|
||||
|
@@ -27,8 +27,8 @@ fi
|
||||
|
||||
# Make sure k8s version env is properly set
|
||||
if [ -z ${K8S_VERSION} ]; then
|
||||
echo "Please export K8S_VERSION in your env"
|
||||
exit 1
|
||||
K8S_VERSION="1.0.3"
|
||||
echo "K8S_VERSION is not set, using default: ${K8S_VERSION}"
|
||||
else
|
||||
echo "k8s version is set to: ${K8S_VERSION}"
|
||||
fi
|
||||
@@ -135,8 +135,32 @@ start_k8s(){
|
||||
sleep 5
|
||||
|
||||
# Start kubelet & proxy, then start master components as pods
|
||||
docker run --net=host --privileged --restart=always -d -v /sys:/sys:ro -v /var/run/docker.sock:/var/run/docker.sock gcr.io/google_containers/hyperkube:v${K8S_VERSION} /hyperkube kubelet --api-servers=http://localhost:8080 --v=2 --address=0.0.0.0 --enable-server --hostname-override=127.0.0.1 --config=/etc/kubernetes/manifests-multi --cluster-dns=10.0.0.10 --cluster-domain=cluster.local
|
||||
docker run -d --net=host --privileged gcr.io/google_containers/hyperkube:v${K8S_VERSION} /hyperkube proxy --master=http://127.0.0.1:8080 --v=2
|
||||
docker run \
|
||||
--net=host \
|
||||
--privileged \
|
||||
--restart=always \
|
||||
-d \
|
||||
-v /sys:/sys:ro \
|
||||
-v /var/run:/var/run:rw \
|
||||
-v /:/rootfs:ro \
|
||||
-v /dev:/dev \
|
||||
-v /var/lib/docker/:/var/lib/docker:ro \
|
||||
-v /var/lib/kubelet/:/var/lib/kubelet:rw \
|
||||
gcr.io/google_containers/hyperkube:v${K8S_VERSION} \
|
||||
/hyperkube kubelet \
|
||||
--api-servers=http://localhost:8080 \
|
||||
--v=2 --address=0.0.0.0 --enable-server \
|
||||
--hostname-override=127.0.0.1 \
|
||||
--config=/etc/kubernetes/manifests-multi \
|
||||
--cluster-dns=10.0.0.10 \
|
||||
--cluster-domain=cluster.local
|
||||
|
||||
docker run \
|
||||
-d \
|
||||
--net=host \
|
||||
--privileged \
|
||||
gcr.io/google_containers/hyperkube:v${K8S_VERSION} \
|
||||
/hyperkube proxy --master=http://127.0.0.1:8080 --v=2
|
||||
}
|
||||
|
||||
echo "Detecting your OS distro ..."
|
||||
|
@@ -47,8 +47,7 @@ NAME LABELS STATUS
|
||||
127.0.0.1 kubernetes.io/hostname=127.0.0.1 Ready
|
||||
```
|
||||
|
||||
If the status of any node is `Unknown` or `NotReady` your cluster is broken, double check that all containers are running properly, and if all else fails, contact us on IRC at
|
||||
[`#google-containers`](http://webchat.freenode.net/?channels=google-containers) for advice.
|
||||
If the status of any node is `Unknown` or `NotReady` your cluster is broken, double check that all containers are running properly, and if all else fails, contact us on [Slack](../../troubleshooting.md#slack).
|
||||
|
||||
### Run an application
|
||||
|
||||
|
@@ -27,13 +27,14 @@ fi
|
||||
|
||||
# Make sure k8s version env is properly set
|
||||
if [ -z ${K8S_VERSION} ]; then
|
||||
echo "Please export K8S_VERSION in your env"
|
||||
exit 1
|
||||
K8S_VERSION="1.0.3"
|
||||
echo "K8S_VERSION is not set, using default: ${K8S_VERSION}"
|
||||
else
|
||||
echo "k8s version is set to: ${K8S_VERSION}"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Run as root
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
echo >&2 "Please run as root"
|
||||
@@ -133,8 +134,31 @@ start_k8s() {
|
||||
sleep 5
|
||||
|
||||
# Start kubelet & proxy in container
|
||||
sudo docker run --net=host --privileged --restart=always -d -v /sys:/sys:ro -v /var/run/docker.sock:/var/run/docker.sock gcr.io/google_containers/hyperkube:v${K8S_VERSION} /hyperkube kubelet --api-servers=http://${MASTER_IP}:8080 --v=2 --address=0.0.0.0 --enable-server --hostname-override=$(hostname -i) --cluster-dns=10.0.0.10 --cluster-domain=cluster.local
|
||||
sudo docker run -d --net=host --privileged --restart=always gcr.io/google_containers/hyperkube:v${K8S_VERSION} /hyperkube proxy --master=http://${MASTER_IP}:8080 --v=2
|
||||
docker run \
|
||||
--net=host \
|
||||
--privileged \
|
||||
--restart=always \
|
||||
-d \
|
||||
-v /sys:/sys:ro \
|
||||
-v /var/run:/var/run:rw \
|
||||
-v /dev:/dev \
|
||||
-v /var/lib/docker/:/var/lib/docker:ro \
|
||||
-v /var/lib/kubelet/:/var/lib/kubelet:rw \
|
||||
gcr.io/google_containers/hyperkube:v${K8S_VERSION} \
|
||||
/hyperkube kubelet --api-servers=http://${MASTER_IP}:8080 \
|
||||
--v=2 --address=0.0.0.0 --enable-server \
|
||||
--hostname-override=$(hostname -i) \
|
||||
--cluster-dns=10.0.0.10 \
|
||||
--cluster-domain=cluster.local
|
||||
|
||||
docker run \
|
||||
-d \
|
||||
--net=host \
|
||||
--privileged \
|
||||
--restart=always \
|
||||
gcr.io/google_containers/hyperkube:v${K8S_VERSION} \
|
||||
/hyperkube proxy --master=http://${MASTER_IP}:8080 \
|
||||
--v=2
|
||||
}
|
||||
|
||||
echo "Detecting your OS distro ..."
|
||||
|
@@ -90,7 +90,7 @@ By default, some containers will already be running on your cluster. Containers
|
||||
|
||||
The script run by the commands above creates a cluster with the name/prefix "kubernetes". It defines one specific cluster config, so you can't run it more than once.
|
||||
|
||||
Alternately, you can download and install the latest Kubernetes release from [this page](https://github.com/GoogleCloudPlatform/kubernetes/releases), then run the `<kubernetes>/cluster/kube-up.sh` script to start the cluster:
|
||||
Alternately, you can download and install the latest Kubernetes release from [this page](https://github.com/kubernetes/kubernetes/releases), then run the `<kubernetes>/cluster/kube-up.sh` script to start the cluster:
|
||||
|
||||
```bash
|
||||
cd kubernetes
|
||||
@@ -100,7 +100,7 @@ cluster/kube-up.sh
|
||||
If you want more than one cluster running in your project, want to use a different name, or want a different number of worker nodes, see the `<kubernetes>/cluster/gce/config-default.sh` file for more fine-grained configuration before you start up your cluster.
|
||||
|
||||
If you run into trouble, please see the section on [troubleshooting](gce.md#troubleshooting), post to the
|
||||
[google-containers group](https://groups.google.com/forum/#!forum/google-containers), or come ask questions on IRC at [#google-containers](http://webchat.freenode.net/?channels=google-containers) on freenode.
|
||||
[google-containers group](https://groups.google.com/forum/#!forum/google-containers), or come ask questions on [Slack](../troubleshooting.md#slack).
|
||||
|
||||
The next few steps will show you:
|
||||
|
||||
|
@@ -151,12 +151,12 @@ host machine (mac).
|
||||
1. Checkout source
|
||||
|
||||
```
|
||||
git clone https://github.com/GoogleCloudPlatform/kubernetes
|
||||
git clone https://github.com/kubernetes/kubernetes
|
||||
cd kubernetes
|
||||
```
|
||||
|
||||
By default, that will get you the bleeding edge of master branch.
|
||||
You may want a [release branch](https://github.com/GoogleCloudPlatform/kubernetes/releases) instead,
|
||||
You may want a [release branch](https://github.com/kubernetes/kubernetes/releases) instead,
|
||||
if you have trouble with master.
|
||||
|
||||
1. Build binaries
|
||||
|
@@ -85,7 +85,7 @@ ssh jclouds@${ip_address_of_master_node}
|
||||
Build Kubernetes-Mesos.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/GoogleCloudPlatform/kubernetes
|
||||
git clone https://github.com/kubernetes/kubernetes
|
||||
cd kubernetes
|
||||
export KUBERNETES_CONTRIB=mesos
|
||||
make
|
||||
|
@@ -79,6 +79,7 @@ The current cluster design is inspired by:
|
||||
## Cluster
|
||||
|
||||
There is a specific `cluster/rackspace` directory with the scripts for the following steps:
|
||||
|
||||
1. A cloud network will be created and all instances will be attached to this network.
|
||||
- flanneld uses this network for next hop routing. These routes allow the containers running on each node to communicate with one another on this private network.
|
||||
2. A SSH key will be created and uploaded if needed. This key must be used to ssh into the machines (we do not capture the password).
|
||||
@@ -91,9 +92,9 @@ There is a specific `cluster/rackspace` directory with the scripts for the follo
|
||||
- A number of the items in `config-default.sh` are overridable via environment variables.
|
||||
- For older versions please either:
|
||||
* Sync back to `v0.9` with `git checkout v0.9`
|
||||
* Download a [snapshot of `v0.9`](https://github.com/GoogleCloudPlatform/kubernetes/archive/v0.9.tar.gz)
|
||||
* Download a [snapshot of `v0.9`](https://github.com/kubernetes/kubernetes/archive/v0.9.tar.gz)
|
||||
* Sync back to `v0.3` with `git checkout v0.3`
|
||||
* Download a [snapshot of `v0.3`](https://github.com/GoogleCloudPlatform/kubernetes/archive/v0.3.tar.gz)
|
||||
* Download a [snapshot of `v0.3`](https://github.com/kubernetes/kubernetes/archive/v0.3.tar.gz)
|
||||
|
||||
## Network Design
|
||||
|
||||
|
@@ -212,7 +212,7 @@ A Kubernetes binary release includes all the Kubernetes binaries as well as the
|
||||
You can use a Kubernetes binary release (recommended) or build your Kubernetes binaries following the instructions in the
|
||||
[Developer Documentation](../devel/README.md). Only using a binary release is covered in this guide.
|
||||
|
||||
Download the [latest binary release](https://github.com/GoogleCloudPlatform/kubernetes/releases/latest) and unzip it.
|
||||
Download the [latest binary release](https://github.com/kubernetes/kubernetes/releases/latest) and unzip it.
|
||||
Then locate `./kubernetes/server/kubernetes-server-linux-amd64.tar.gz` and unzip *that*.
|
||||
Then, within the second set of unzipped files, locate `./kubernetes/server/bin`, which contains
|
||||
all the necessary binaries.
|
||||
@@ -226,7 +226,7 @@ we recommend that you run these as containers, so you need an image to be built.
|
||||
You have several choices for Kubernetes images:
|
||||
- Use images hosted on Google Container Registry (GCR):
|
||||
- e.g `gcr.io/google_containers/hyperkube:$TAG`, where `TAG` is the latest
|
||||
release tag, which can be found on the [latest releases page](https://github.com/GoogleCloudPlatform/kubernetes/releases/latest).
|
||||
release tag, which can be found on the [latest releases page](https://github.com/kubernetes/kubernetes/releases/latest).
|
||||
- Ensure $TAG is the same tag as the release tag you are using for kubelet and kube-proxy.
|
||||
- The [hyperkube](../../cmd/hyperkube/) binary is an all in one binary
|
||||
- `hyperkube kubelet ...` runs the kublet, `hyperkube apiserver ...` runs an apiserver, etc.
|
||||
@@ -875,7 +875,7 @@ pinging or SSH-ing from one node to another.
|
||||
### Getting Help
|
||||
|
||||
If you run into trouble, please see the section on [troubleshooting](gce.md#troubleshooting), post to the
|
||||
[google-containers group](https://groups.google.com/forum/#!forum/google-containers), or come ask questions on IRC at [#google-containers](http://webchat.freenode.net/?channels=google-containers) on freenode.
|
||||
[google-containers group](https://groups.google.com/forum/#!forum/google-containers), or come ask questions on [Slack](../troubleshooting.md#slack).
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
|
@@ -35,7 +35,7 @@ Kubernetes Deployment On Bare-metal Ubuntu Nodes with Calico Networking
|
||||
|
||||
## Introduction
|
||||
|
||||
This document describes how to deploy Kubernetes on ubuntu bare metal nodes with Calico Networking plugin. See [projectcalico.org](http://projectcalico.org) for more information on what Calico is, and [the calicoctl github](https://github.com/projectcalico/calico-docker) for more information on the command-line tool, `calicoctl`.
|
||||
This document describes how to deploy Kubernetes on Ubuntu bare metal nodes with Calico Networking plugin. See [projectcalico.org](http://projectcalico.org) for more information on what Calico is, and [the calicoctl github](https://github.com/projectcalico/calico-docker) for more information on the command-line tool, `calicoctl`.
|
||||
|
||||
This guide will set up a simple Kubernetes cluster with a master and two nodes. We will start the following processes with systemd:
|
||||
|
||||
@@ -54,7 +54,8 @@ On each Node:
|
||||
## Prerequisites
|
||||
|
||||
1. This guide uses `systemd` and thus uses Ubuntu 15.04 which supports systemd natively.
|
||||
2. All Kubernetes nodes should have the latest docker stable version installed. At the time of writing, that is Docker 1.7.0.
|
||||
2. All machines should have the latest docker stable version installed. At the time of writing, that is Docker 1.7.0.
|
||||
- To install docker, follow [these instructions](https://docs.docker.com/installation/ubuntulinux/)
|
||||
3. All hosts should be able to communicate with each other, as well as the internet, to download the necessary files.
|
||||
4. This demo assumes that none of the hosts have been configured with any Kubernetes or Calico software yet.
|
||||
|
||||
@@ -122,8 +123,6 @@ sudo systemctl start kube-controller-manager.service
|
||||
sudo systemctl start kube-scheduler.service
|
||||
```
|
||||
|
||||
> *You may want to consider checking their status after to ensure everything is running.*
|
||||
|
||||
### Install Calico on Master
|
||||
|
||||
In order to allow the master to route to pods on our nodes, we will launch the calico-node daemon on our master. This will allow it to learn routes over BGP from the other calico-node daemons in the cluster. The docker daemon should already be running before calico is started.
|
||||
@@ -176,6 +175,7 @@ sudo mv -f network-environment /etc
|
||||
Instead of using docker's default interface (docker0), we will configure a new one to use desired IP ranges
|
||||
|
||||
```
|
||||
sudo apt-get install -y bridge-utils
|
||||
sudo brctl addbr cbr0
|
||||
sudo ifconfig cbr0 up
|
||||
sudo ifconfig cbr0 <IP>/24
|
||||
@@ -197,9 +197,12 @@ The Docker daemon must be started and told to use the already configured cbr0 in
|
||||
|
||||
2.) Find the line that reads `ExecStart=/usr/bin/docker -d -H fd://` and append the following flags: `--bridge=cbr0 --iptables=false --ip-masq=false`
|
||||
|
||||
3.) Reload systemctl with `sudo systemctl daemon-reload`
|
||||
3.) Reload systemctl and restart docker.
|
||||
|
||||
4.) Restart docker with with `sudo systemctl restart docker`
|
||||
```
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart docker
|
||||
```
|
||||
|
||||
### Install Calico on the Node
|
||||
|
||||
@@ -241,6 +244,10 @@ kubernetes/cluster/ubuntu/build.sh
|
||||
|
||||
# Add binaries to /usr/bin
|
||||
sudo cp -f binaries/minion/* /usr/bin
|
||||
|
||||
# Get the iptables based kube-proxy reccomended for this demo
|
||||
sudo wget https://github.com/projectcalico/calico-kubernetes/releases/download/v0.1.1/kube-proxy -P /usr/bin/
|
||||
sudo chmod +x /usr/bin/kube-proxy
|
||||
```
|
||||
|
||||
2.) Install and launch the sample systemd processes settings for launching Kubernetes services
|
||||
@@ -256,6 +263,14 @@ sudo systemctl start kube-kubelet.service
|
||||
|
||||
>*You may want to consider checking their status after to ensure everything is running*
|
||||
|
||||
## Install the DNS Addon
|
||||
|
||||
Most Kubernetes deployments will require the DNS addon for service discovery. For more on DNS service discovery, check [here](../../cluster/addons/dns/).
|
||||
|
||||
The config repository for this guide comes with manifest files to start the DNS addon. To install DNS, do the following on your Master node.
|
||||
|
||||
Replace `<MASTER_IP>` in `calico-kubernetes-ubuntu-demo-master/dns/skydns-rc.yaml` with your Master's IP address. Then, create `skydns-rc.yaml` and `skydns-svc.yaml` using `kubectl create -f <FILE>`.
|
||||
|
||||
## Launch other Services With Calico-Kubernetes
|
||||
|
||||
At this point, you have a fully functioning cluster running on kubernetes with a master and 2 nodes networked with Calico. You can now follow any of the [standard documentation](../../examples/) to set up other services on your cluster.
|
||||
@@ -268,12 +283,15 @@ With this sample configuration, because the containers have private `192.168.0.0
|
||||
|
||||
The simplest method for enabling connectivity from containers to the internet is to use an iptables masquerade rule. This is the standard mechanism [recommended](../../docs/admin/networking.md#google-compute-engine-gce) in the Kubernetes GCE environment.
|
||||
|
||||
We need to NAT traffic that has a destination outside of the cluster. Internal traffic includes the master/nodes, and the container IP pools. Assuming that the master and nodes are in the `172.25.0.0/24` subnet, the cbr0 IP ranges are all in the `192.168.0.0/16` network, and the nodes use the interface `eth0` for external connectivity, a suitable masquerade chain would look like this:
|
||||
We need to NAT traffic that has a destination outside of the cluster. Internal traffic includes the master/nodes, and the container IP pools. A suitable masquerade chain would follow the pattern below, replacing the following variables:
|
||||
- `CONTAINER_SUBNET`: The cluster-wide subnet from which container IPs are chosen. All cbr0 bridge subnets fall within this range. The above example uses `192.168.0.0/16`.
|
||||
- `KUBERNETES_HOST_SUBNET`: The subnet from which Kubernetes node / master IP addresses have been chosen.
|
||||
- `HOST_INTERFACE`: The interface on the Kubernetes node which is used for external connectivity. The above example uses `eth0`
|
||||
|
||||
```
|
||||
sudo iptables -t nat -N KUBE-OUTBOUND-NAT
|
||||
sudo iptables -t nat -A KUBE-OUTBOUND-NAT -d 192.168.0.0/16 -o eth0 -j RETURN
|
||||
sudo iptables -t nat -A KUBE-OUTBOUND-NAT -d 172.25.0.0/24 -o eth0 -j RETURN
|
||||
sudo iptables -t nat -A KUBE-OUTBOUND-NAT -d <CONTAINER_SUBNET> -o <HOST_INTERFACE> -j RETURN
|
||||
sudo iptables -t nat -A KUBE-OUTBOUND-NAT -d <KUBERNETES_HOST_SUBNET> -o <HOST_INTERFACE> -j RETURN
|
||||
sudo iptables -t nat -A KUBE-OUTBOUND-NAT -j MASQUERADE
|
||||
sudo iptables -t nat -A POSTROUTING -j KUBE-OUTBOUND-NAT
|
||||
```
|
||||
|
@@ -69,7 +69,7 @@ Ubuntu 15 which use systemd instead of upstart. We are working around fixing thi
|
||||
First clone the kubernetes github repo
|
||||
|
||||
``` console
|
||||
$ git clone https://github.com/GoogleCloudPlatform/kubernetes.git
|
||||
$ git clone https://github.com/kubernetes/kubernetes.git
|
||||
```
|
||||
|
||||
Then download all the needed binaries into given directory (cluster/ubuntu/binaries)
|
||||
|
@@ -72,7 +72,7 @@ export KUBERNETES_PROVIDER=vagrant
|
||||
curl -sS https://get.k8s.io | bash
|
||||
```
|
||||
|
||||
Alternatively, you can download [Kubernetes release](https://github.com/GoogleCloudPlatform/kubernetes/releases) and extract the archive. To start your local cluster, open a shell and run:
|
||||
Alternatively, you can download [Kubernetes release](https://github.com/kubernetes/kubernetes/releases) and extract the archive. To start your local cluster, open a shell and run:
|
||||
|
||||
```sh
|
||||
cd kubernetes
|
||||
|
Reference in New Issue
Block a user