2015-07-12 04:04:52 +00:00
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->
<!-- BEGIN STRIP_FOR_RELEASE -->
2015-07-16 17:02:26 +00:00
< img src = "http://kubernetes.io/img/warning.png" alt = "WARNING"
width="25" height="25">
< img src = "http://kubernetes.io/img/warning.png" alt = "WARNING"
width="25" height="25">
< img src = "http://kubernetes.io/img/warning.png" alt = "WARNING"
width="25" height="25">
< img src = "http://kubernetes.io/img/warning.png" alt = "WARNING"
width="25" height="25">
< img src = "http://kubernetes.io/img/warning.png" alt = "WARNING"
width="25" height="25">
< h2 > PLEASE NOTE: This document applies to the HEAD of the source tree< / h2 >
If you are using a released version of Kubernetes, you should
refer to the docs that go with that version.
2015-12-14 18:37:38 +00:00
<!-- TAG RELEASE_LINK, added by the munger automatically -->
2015-07-16 17:02:26 +00:00
< strong >
2015-11-03 18:17:57 +00:00
The latest release of this document can be found
[here ](http://releases.k8s.io/release-1.1/docs/getting-started-guides/rackspace.md ).
2015-07-16 17:02:26 +00:00
Documentation for other releases can be found at
[releases.k8s.io ](http://releases.k8s.io ).
< / strong >
--
2015-07-13 22:15:35 +00:00
2015-07-12 04:04:52 +00:00
<!-- END STRIP_FOR_RELEASE -->
<!-- END MUNGE: UNVERSIONED_WARNING -->
2015-06-22 19:39:35 +00:00
Getting started on Rackspace
----------------------------
2015-06-22 18:56:19 +00:00
2015-06-22 19:39:35 +00:00
**Table of Contents**
2015-06-22 18:56:19 +00:00
2015-06-23 15:20:31 +00:00
- [Introduction ](#introduction )
- [Prerequisites ](#prerequisites )
- [Provider: Rackspace ](#provider-rackspace )
- [Build ](#build )
- [Cluster ](#cluster )
- [Some notes: ](#some-notes )
- [Network Design ](#network-design )
2015-06-22 18:56:19 +00:00
## Introduction
2015-04-17 16:46:32 +00:00
2015-06-08 18:45:39 +00:00
* Supported Version: v0.18.1
2015-04-17 16:46:32 +00:00
2015-06-26 19:13:43 +00:00
In general, the dev-build-and-up.sh workflow for Rackspace is the similar to Google Compute Engine. The specific implementation is different due to the use of CoreOS, Rackspace Cloud Files and the overall network design.
2014-10-12 00:32:53 +00:00
2014-10-17 20:10:08 +00:00
These scripts should be used to deploy development environments for Kubernetes. If your account leverages RackConnect or non-standard networking, these scripts will most likely not work without modification.
2014-10-12 00:32:53 +00:00
2015-05-08 21:59:32 +00:00
NOTE: The rackspace scripts do NOT rely on `saltstack` and instead rely on cloud-init for configuration.
2014-10-01 23:17:51 +00:00
2014-10-12 00:32:53 +00:00
The current cluster design is inspired by:
2015-07-16 21:54:28 +00:00
- [corekube ](https://github.com/metral/corekube )
- [Angus Lees ](https://github.com/anguslees/kube-openstack )
2014-07-22 22:43:41 +00:00
## Prerequisites
2015-07-17 22:35:41 +00:00
2015-05-08 21:59:32 +00:00
1. Python2.7
2. You need to have both `nova` and `swiftly` installed. It's recommended to use a python virtualenv to install these packages into.
3. Make sure you have the appropriate environment variables set to interact with the OpenStack APIs. See [Rackspace Documentation ](http://docs.rackspace.com/servers/api/v2/cs-gettingstarted/content/section_gs_install_nova.html ) for more details.
2015-07-17 22:35:41 +00:00
## Provider: Rackspace
2014-07-22 22:43:41 +00:00
2015-05-08 21:59:32 +00:00
- To build your own released version from source use `export KUBERNETES_PROVIDER=rackspace` and run the `bash hack/dev-build-and-up.sh`
2015-06-08 18:45:39 +00:00
- Note: The get.k8s.io install method is not working yet for our scripts.
2015-07-20 20:45:36 +00:00
* To install the latest released version of Kubernetes use `export KUBERNETES_PROVIDER=rackspace; wget -q -O - https://get.k8s.io | bash`
2014-07-22 22:43:41 +00:00
2014-10-12 00:32:53 +00:00
## Build
2015-07-17 22:35:41 +00:00
2015-07-20 20:45:36 +00:00
1. The Kubernetes binaries will be built via the common build scripts in `build/` .
2014-10-17 20:10:08 +00:00
2. If you've set the ENV `KUBERNETES_PROVIDER=rackspace` , the scripts will upload `kubernetes-server-linux-amd64.tar.gz` to Cloud Files.
2014-09-30 10:25:07 +00:00
2. A cloud files container will be created via the `swiftly` CLI and a temp URL will be enabled on the object.
2015-07-07 17:37:40 +00:00
3. The built `kubernetes-server-linux-amd64.tar.gz` will be uploaded to this container and the URL will be passed to master/nodes when booted.
2014-07-22 22:43:41 +00:00
## Cluster
2015-07-17 22:35:41 +00:00
2015-05-08 21:59:32 +00:00
There is a specific `cluster/rackspace` directory with the scripts for the following steps:
2015-09-08 14:40:45 +00:00
2015-05-08 21:59:32 +00:00
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.
2015-06-09 12:53:11 +00:00
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).
2015-05-08 21:59:32 +00:00
3. The master server and additional nodes will be created via the `nova` CLI. A `cloud-config.yaml` is generated and provided as user-data with the entire configuration for the systems.
2015-11-24 03:06:36 +00:00
4. We then boot as many nodes as defined via `$NUM_NODES` .
2014-07-22 22:43:41 +00:00
2015-07-13 18:11:34 +00:00
## Some notes
2015-07-17 22:35:41 +00:00
2014-07-22 22:43:41 +00:00
- The scripts expect `eth2` to be the cloud network that the containers will communicate across.
- A number of the items in `config-default.sh` are overridable via environment variables.
2014-10-17 20:10:08 +00:00
- For older versions please either:
2015-05-08 21:59:32 +00:00
* Sync back to `v0.9` with `git checkout v0.9`
2015-09-03 14:10:11 +00:00
* Download a [snapshot of `v0.9` ](https://github.com/kubernetes/kubernetes/archive/v0.9.tar.gz )
2014-10-17 20:10:08 +00:00
* Sync back to `v0.3` with `git checkout v0.3`
2015-09-03 14:10:11 +00:00
* Download a [snapshot of `v0.3` ](https://github.com/kubernetes/kubernetes/archive/v0.3.tar.gz )
2014-10-17 20:10:08 +00:00
## Network Design
2015-07-17 22:35:41 +00:00
2014-10-17 20:10:08 +00:00
- eth0 - Public Interface used for servers/containers to reach the internet
- eth1 - ServiceNet - Intra-cluster communication (k8s, etcd, etc) communicate via this interface. The `cloud-config` files use the special CoreOS identifier `$private_ipv4` to configure the services.
- eth2 - Cloud Network - Used for k8s pods to communicate with one another. The proxy service will pass traffic via this interface.
2015-05-14 22:12:45 +00:00
2015-07-14 00:13:09 +00:00
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
2015-05-14 22:12:45 +00:00
[![Analytics ](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/getting-started-guides/rackspace.md?pixel )]()
2015-07-14 00:13:09 +00:00
<!-- END MUNGE: GENERATED_ANALYTICS -->