Skip to content

Commit b5f2a28

Browse files
Loc Nguyenk8s-ci-robot
Loc Nguyen
authored andcommitted
Standalone esx (kubernetes-sigs#264)
* add standalone esx support * move all glog to klog * Fixed machine provisioning on ESXi. - fixed boot sequence on some images (e.g. xenial) - fixed sudo on machines without DNS access - fixed cloud provider bootstrap - fixed rbac role preventing machine deletion - refactored templates.go and the esx cloning code Fixed boot sequence on some images by adding a serial port to allow random number initialization. This affect some images like Xenial. It currently adds a serial port to all machines if it doesn't already in the vm spec. Fixed sudo access for machines without DNS access, which for most development scenarios in nested ESXi on dev laptops. Fixed cloud provider bootstrapping on infrastructure that do not have cloud provider support (e.g. ESXi) issue kubernetes-sigs#177
1 parent 0ec7a86 commit b5f2a28

File tree

20 files changed

+4086
-629
lines changed

20 files changed

+4086
-629
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM golang:1.10.3 as builder
2+
FROM golang:1.12 as builder
33

44
# Copy in the go src
55
WORKDIR /go/src/sigs.k8s.io/cluster-api-provider-vsphere

cmd/clusterctl/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the cluster binary
2-
FROM golang:1.10.3 as builder
2+
FROM golang:1.12 as builder
33

44
# Copy in the go src
55
WORKDIR /go/src/sigs.k8s.io/cluster-api-provider-vsphere

config/rbac/rbac_role.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,11 @@ rules:
5959
- update
6060
- patch
6161
- delete
62+
- apiGroups:
63+
- ""
64+
resources:
65+
- nodes
66+
verbs:
67+
- list
68+
- get
69+
- watch

docs/self-service/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22

33
The following is a quick how-to-use guide on using the cluster api on a vCenter infrastructure. Before beginning, make sure you have the following requirements:
44

5-
1. vCenter 6.5 cluster
5+
1. vCenter 6.5+ cluster or ESXi 6.5+
66
- You will need to gather some information about the cluster, described below.
7-
2. golang 1.10+
7+
- [ESXi provisioning](./esx_provisioning.md) should be used for development purposes only.
8+
2. golang 1.12+
89
3. a type 2 desktop hypervisor (Vmware Fusion/Workstation or VirtualBox)
910
4. GOPATH environment set
1011
5. dep installed (https://github.com/golang/dep)
1112
6. kustomize V2 installed (https://github.com/kubernetes-sigs/kustomize/blob/master/docs/INSTALL.md)
1213
7. kubebuilder installed (https://book.kubebuilder.io/quick_start.html)
1314

14-
**Be aware, the current repo supports deploying Kubernetes 1.11.x and above. Older versions maybe supported in the future.**
15+
**Be aware, the current repo supports deploying Kubernetes 1.11.x and above.**
1516

1617
### Decide on whether to use minikube or kind as your bootstrapper
1718

docs/self-service/esx_provisioning.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Provisioning on ESXi
2+
3+
This cluster api provider is capable of provisioning clusters on ESXi with some limitations. It was written as a
4+
productivity tool for developers of this provider. Some of the limitations are as follows,
5+
6+
1. The vSphere cloud provider is not available on ESXi. All features provided by the cloud provider will be
7+
unavailable to clusters provisioned to ESXi.
8+
2. VM cloning is available on vCenter but not on ESXi. The VM creation process currently is unable to resize the
9+
machine's disk yet. This may change in the future.
10+
11+
Provioning on ESXi is very similar to provisioning on vCenter. Make sure to read the [main Quickstart intro](
12+
./README.md) to learn the basics. This page will discuss the differences, which are simple changes to the cluster
13+
and machine definition files. The vSphere Cluster API provider will automatically detect whether the infrastructure
14+
is vCenter or ESXi; however, some of the changes to the definition files will ensure the cluster is properly
15+
functioning once it is provisioned.
16+
17+
### Cluster definition files
18+
19+
The cluster definition file remain largely the same as for deploying to vCenter. The one thing to watch out for is
20+
to make sure the cidr ranges do not overlap with the subnet of your ESXi's network. If the pod cidr ranges overlap,
21+
the CNI plugin may fail to deploy correctly. As an example, suppose a developer deploys an ESXi host and uses the
22+
internal gateway server as the DNS server, make sure the pod CIDR does not overlap with the ESXi host's DHCP IP range.
23+
24+
### Machine definition files
25+
26+
The machine definition files remain largely the same. Make sure to leave `datacenter` and `resourcePool` empty.
27+
These fields are irrelevant for ESXi.

0 commit comments

Comments
 (0)