Skip to content

Commit

Permalink
Update quick start parameters for AWS and vSphere
Browse files Browse the repository at this point in the history
Signed-off-by: Naadir Jeewa <[email protected]>
  • Loading branch information
Naadir Jeewa committed Mar 10, 2020
1 parent 5087913 commit 228c750
Showing 1 changed file with 49 additions and 27 deletions.
76 changes: 49 additions & 27 deletions docs/book/src/tasks/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

## Install and/or configure a kubernetes cluster

Cluster API requires an existing Kubernetes cluster accessible via kubectl; during the installation process the
Kubernetes cluster will be transformed into a [management cluster] by installing the Cluster API [provider components], so it
Cluster API requires an existing Kubernetes cluster accessible via kubectl; during the installation process the
Kubernetes cluster will be transformed into a [management cluster] by installing the Cluster API [provider components], so it
is recommended to keep it separated from any application workload.

Please note that it is a common practice the creation of a temporary [bootstrap cluster] to be used to provision
Please note that it is a common practice the creation of a temporary [bootstrap cluster] to be used to provision
a target [management cluster] on the selected [infrastructure provider].

Choose one of the options below:
Expand All @@ -35,7 +35,7 @@ export KUBECONFIG=<...>

</aside>

[kind] can be used for creating a local Kubernetes cluster for development environments or for
[kind] can be used for creating a local Kubernetes cluster for development environments or for
the creation of a temporary [bootstrap cluster] used to provision a target [management cluster] on the selected infrastructure provider.

```bash
Expand All @@ -50,18 +50,36 @@ kubectl cluster-info
Depending on the infrastructure provider you are planning to use, some additional prerequisites should be satisfied
before getting started with Cluster API.

<aside class="note">

<h1>Note</h1>

Throughout this quickstart, we've given instructions on setting parameters using environment variables.
For most environment variables in the rest of the guide, you can also set them in ~/.cluster-api/clusterctl.yaml

</aside>

{{#tabs name:"tab-installation-infrastructure" tabs:"AWS,Azure,Docker,GCP,vSphere,OpenStack,Metal3"}}
{{#tab AWS}}

Download the latest binary of `clusterawsadm` from the [AWS provider releases] and make sure to place it in your path.


```bash
$ export AWS_REGION=us-east-1 # This is used to help encode your environment variables
# Create the base64 encoded credentials using clusterawsadm.
# This command uses your environment variables and encodes
# them in a value to be stored in a Kubernetes Secret.
export AWS_B64ENCODED_CREDENTIALS=$(clusterawsadm alpha bootstrap encode-aws-credentials)
$ export AWS_B64ENCODED_CREDENTIALS=$(clusterawsadm alpha bootstrap encode-aws-credentials)
# This is the name of the SSH key in the EC2 console in
# the region you are going to place a cluster
$ export AWS_SSH_KEY_NAME=default
# Select instance types
$ export CONTROL_PLANE_MACHINE_TYPE=t3.large
$ export NODE_MACHINE_TYPE=t3.large
```


See the [AWS Provider Prerequisites](https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/master/docs/prerequisites.md) document for more details.

{{#/tab }}
Expand All @@ -70,7 +88,6 @@ See the [AWS Provider Prerequisites](https://github.com/kubernetes-sigs/cluster-
For more information about authorization, AAD, or requirements for Azure, visit the [Azure Provider Prerequisites](https://github.com/kubernetes-sigs/cluster-api-provider-azure/blob/master/docs/getting-started.md#prerequisites) document.

```bash
# Create the base64 encoded credentials
export AZURE_SUBSCRIPTION_ID_B64="$(echo -n "$AZURE_SUBSCRIPTION_ID" | base64 | tr -d '\n')"
export AZURE_TENANT_ID_B64="$(echo -n "$AZURE_TENANT_ID" | base64 | tr -d '\n')"
export AZURE_CLIENT_ID_B64="$(echo -n "$AZURE_CLIENT_ID" | base64 | tr -d '\n')"
Expand All @@ -96,29 +113,34 @@ export GCP_B64ENCODED_CREDENTIALS=$( cat /path/to/gcp-credentials.json | base64
{{#/tab }}
{{#tab vSphere}}

It is required to use an official CAPV machine image for your vSphere VM templates. See [Uploading CAPV Machine Images](https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/master/docs/getting_started.md#uploading-the-capv-machine-image) for instructions on how to do this.
It is required to use an official CAPV machine images for your vSphere VM templates. See [Uploading CAPV machine images](https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/master/docs/getting_started.md#uploading-the-machine-images) for instructions on how to do this.

Then, it is required Upload vCenter credentials as a Kubernetes secret:

```bash
$ cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
name: capv-system
---
apiVersion: v1
kind: Secret
metadata:
name: capv-manager-bootstrap-credentials
namespace: capv-system
type: Opaque
stringData:
username: "<my vCenter username>"
password: "<my vCenter password>"
EOF
# The username used to access the remote vSphere endpoint
$ export VSPHERE_USERNAME="[email protected]"
# The password used to access the remote vSphere endpoint
# You may want to set this in ~/.cluster-api/clusterctl.yaml so your password is not in
# bash history
$ export VSPHERE_PASSWORD="admin!23"
# The vCenter server IP or FQDN
$ export VSPHERE_SERVER="10.0.0.1"
# The vSphere datacenter to deploy the management cluster on
$ export VSPHERE_DATACENTER="SDDC-Datacenter"
# The vSphere datastore to deploy the management cluster on
$ export VSPHERE_DATASTORE="vsanDatastore"
# The VM network to deploy the management cluster on
$ export VSPHERE_NETWORK="VM Network"
# The vSphere resource pool for your VMs
$ export VSPHERE_RESOURCE_POOL="*/Resources"
# The VM folder for your VMs. Set to "" to use the root vSphere folder
$ export VSPHERE_FOLDER: "vm"
# The VM template to use for your
$ export VSPHERE_TEMPLATE: "ubuntu-1804-kube-v1.17.3" m
# The VM template to use for the HAProxy load balanceranagement cluster.
$ export VSPHERE_HAPROXY_TEMPLATE: "capv-haproxy-v0.6.0-rc.2"
# The public ssh authorized key on all machines
$ export VSPHERE_SSH_AUTHORIZED_KEY: "ssh-rsa AAAAB3N..."
```

For more information about prerequisites, credentials management, or permissions for vSphere, visit the [getting started guide](https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/master/docs/getting_started.md).
Expand Down Expand Up @@ -190,4 +212,4 @@ clusterctl version
[kubectl]: https://kubernetes.io/docs/tasks/tools/install-kubectl/
[kind]: https://kind.sigs.k8s.io/
[management cluster]: ../reference/glossary.md#management-cluster
[provider components]: ../reference/glossary.md#provider-components
[provider components]: ../reference/glossary.md#provider-components

0 comments on commit 228c750

Please sign in to comment.