
Instead of using `godep path`, we can simply set the GOPATH directly to point to the Godeps/_workspace. We can still use `godep` to manage the dependencies on the Godeps/ tree, but we don't need to have it available for straight builds from git. v2: Rebased and moved to inside kube::setup_go_environment() function. Tested: - Built it without godep in $PATH: $ hack/build-go.sh - Ran unit tests without godep in $PATH: $ hack/test-go.sh - Retested after rebase. Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2.0 KiB
Getting started with vSphere
Prerequisites
-
You need administrator credentials to an ESXi machine or vCenter instance.
-
You must have Go (version 1.2 or later) installed: www.golang.org.
-
You must have your
GOPATH
set up and include$GOPATH/bin
in yourPATH
.export GOPATH=$HOME/src/go mkdir -p $GOPATH export PATH=$PATH:$GOPATH/bin
-
Install the govc tool to interact with ESXi/vCenter:
go get github.com/vmware/govmomi/govc
-
Install godep (optional, only required when modifying package dependencies). Instructions here
-
Get the Kubernetes source:
go get github.com/GoogleCloudPlatform/kubernetes cd $GOPATH/src/github.com/GoogleCloudPlatform/kubernetes
Setup
Download a prebuilt Debian VMDK to be used as base image:
wget https://storage.googleapis.com/govmomi/vmdk/kube.vmdk.gz{,.md5}
md5sum -c kube.vmdk.gz.md5
gzip -d kube.vmdk.gz
Upload this VMDK to your vSphere instance:
export GOVC_URL='https://user:pass@hostname/sdk'
export GOVC_DATASTORE='target datastore'
export GOVC_RESOURCE_POOL='resource pool with access to datastore'
govc datastore.import kube.vmdk
Verify that the VMDK was correctly uploaded and expanded to 10GiB:
govc datastore.ls
Take a look at the file cluster/vsphere/config-common.sh
fill in the required
parameters. The guest login for the image that you imported is kube:kube
.
Now, let's continue with deploying Kubernetes:
cd kubernetes
# Build source
hack/build-go.sh
# Build a release (argument is the instance prefix)
release/build-release.sh kubernetes
# Deploy Kubernetes (takes ~5 minutes, provided everything works out)
export KUBERNETES_PROVIDER=vsphere
cluster/kube-up.sh
Refer to the top level README and the getting started guide for Google Compute Engine. Once you have successfully reached this point, your vSphere Kubernetes deployment works just as any other one!
Enjoy!