Skip to content

Commit f45e67e

Browse files
authored
Merge pull request #988 from yastij/capv-docs-0.7
add docs for v0.7.0
2 parents 57a3737 + 8750730 commit f45e67e

File tree

1 file changed

+34
-16
lines changed

1 file changed

+34
-16
lines changed

docs/getting_started.md

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ After deploying it from the OVA, please ensure the VM `ubuntu-1804-kube-v1.17.3`
5959
govc vm.markastemplate ubuntu-1804-kube-v1.17.3
6060
```
6161

62-
Repeat again for the [HAProxy template image][haproxy-machine-image].
63-
6462
To reduce the time it takes to provisiong machines, linked clone mode is the default `cloneMode` for `vsphereMachines` and is highly
6563
recommended. To be able to use it, your VM templates require snapshots, for which we illustrate the process using the [govc][govc]
6664
command line tool, but can also be done via vCenter, PowerCLI or other tooling:
@@ -74,20 +72,9 @@ govc snapshot.create -vm ubuntu-1804-kube-v1.17.3 root
7472
govc vm.markastemplate ubuntu-1804-kube-v1.17.3
7573
```
7674

77-
for the HAProxy VM template:
78-
79-
```shell
80-
# Re-mark the template as a VM
81-
govc vm.markasvm -pool Compute-ResourcePool capv-haproxy-v0.6.4
82-
# Take a snapshot of the VM
83-
govc snapshot.create -vm capv-haproxy-v0.6.4 root
84-
# Re-mark the VM as a template
85-
govc vm.markastemplate capv-haproxy-v0.6.4
86-
```
87-
8875
**Note:** When creating the OVA template via vSphere using the URL method, please make sure the VM template name is the
89-
same as the value specified by the `VSPHERE_TEMPLATE` and `VSPHERE_HAPROXY_TEMPLATE` environment variables in the
90-
`envvars.txt` file, taking care of the `.ova` suffix for the template name.
76+
same as the value specified by the `VSPHERE_TEMPLATE` environment variable in the
77+
`~/.cluster-api/clusterctl.yaml` file, taking care of the `.ova` suffix for the template name.
9178

9279
**Note:** If you are planning to use CNS/CSI then you will need to ensure that the template is at least at VM Hardware
9380
Version 13, This is done out-of-the-box for images of K8s version `v1.15.4` and above. For versions lower than this you
@@ -125,17 +112,30 @@ VSPHERE_NETWORK: "VM Network" # The VM network t
125112
VSPHERE_RESOURCE_POOL: "*/Resources" # The vSphere resource pool for your VMs
126113
VSPHERE_FOLDER: "vm" # The VM folder for your VMs. Set to "" to use the root vSphere folder
127114
VSPHERE_TEMPLATE: "ubuntu-1804-kube-v1.17.3" # The VM template to use for your management cluster.
128-
VSPHERE_HAPROXY_TEMPLATE: "capv-haproxy-v0.6.4" # The VM template to use for the HAProxy load balancer
115+
CONTROL_PLANE_ENDPOINT_IP: "192.168.9.230" # the IP that kube-vip is going to use as a control plane endpoint
116+
EXP_CLUSTER_RESOURCE_SET: "true" # This enables the ClusterResourceSet feature that we are using to deploy CSI
129117
VSPHERE_SSH_AUTHORIZED_KEY: "ssh-rsa AAAAB3N..." # The public ssh authorized key on all machines
130118
# in this cluster.
131119
# Set to "" if you don't want to enable SSH,
132120
# or are using another solution.
133121
```
134122

123+
If you are using the **DEPRECATED** `haproxy` flavour you will need to add the following variable to your `clusterctl.yaml`:
124+
125+
```yaml
126+
VSPHERE_HAPROXY_TEMPLATE: "capv-haproxy-v0.6.4" # The VM template to use for the HAProxy load balancer
127+
```
128+
135129
**NOTE**: Technically, SSH keys and vSphere folders are optional, but optional template variables are not currently
136130
supported by clusterctl. If you need to not set the vSphere folder or SSH keys, then remove the appropriate fields after
137131
running `clusterctl config`.
138132

133+
the `CONTROL_PLANE_ENDPOINT_IP` is an IP that must be an IP on the same subnet as the control plane machines, it should be also an IP that is not part of your DHCP range
134+
135+
`CONTROL_PLANE_ENDPOINT_IP` is mandatory when you are using the default and the `external-loadbalancer` flavour
136+
137+
the `EXP_CLUSTER_RESOURCE_SET` is required if you want to deploy CSI using cluster resource sets (mandatory in the default flavor).
138+
139139
Once you have access to a management cluster, you can instantiate Cluster API with the following:
140140

141141
```shell
@@ -160,6 +160,11 @@ $ vi edit cluster.yaml
160160
$ kubectl apply -f cluster.yaml
161161
```
162162

163+
aside of the default flavour, CAPV has the following:
164+
165+
- an `external-loadbalancer` flavour that enables you to to specify a pre-existing endpoint
166+
- **DEPRECATED** an `haproxy` flavour to use HAProxy as a control plane endpoint
167+
163168
## Accessing the workload cluster
164169

165170
The kubeconfig for the workload cluster will be stored in a secret, which can
@@ -187,6 +192,19 @@ vsphere-quickstart-9qtfd Ready master
187192
188193
```
189194

195+
## custom cluster templates
196+
197+
the provided cluster templates are quickstarts. If you need anything specific that requires a more complex setup, we recommand to use custom templates:
198+
199+
```shell
200+
$ clusterctl config custom-cluster vsphere-quickstart \
201+
--infrastructure vsphere \
202+
--kubernetes-version v1.17.3 \
203+
--control-plane-machine-count 1 \
204+
--worker-machine-count 3 \
205+
--from ~/workspace/custom-cluster-template.yaml > custom-cluster.yaml
206+
```
207+
190208
<!-- References -->
191209
[vm-template]: https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.vm_admin.doc/GUID-17BEDA21-43F6-41F4-8FB2-E01D275FE9B4.html
192210
[cluster-api-book]: https://cluster-api.sigs.k8s.io/

0 commit comments

Comments
 (0)