Table of contents generated with markdown-toc
See the requirements in Deploying CF for K8s.
In addition to the Kubernetes version requirement in Deploying CF for K8s, the cluster should:
- have a minimum of 6 CPU, 6GB memory if using 1 node
- commonly configured via Docker Desktop > Preferences > Resources
- have a running metrics-server (this is an important consideration for Kind or kubeadm clusters. You can see one way to install it in the Kind deploy instructions)
-
Using minikube allows local image development via the included docker daemon without having to push to a public image registry, whereas kind uses containerd as its backing driver, which doesn't allow for local image creation.
-
The docker driver for minikube is significantly faster than the default virtualbox driver as it uses the local Docker for Mac installation.
- Use
vcap.me
as the domain for the installation. This means that you do not have to configure DNS for the domain.
-
Create a kind cluster:
kind create cluster --config=./deploy/kind/cluster.yml # optional flag: "--image kindest/node:v1.18.2", for example
-
Follow the instructions in Deploying CF for K8s.
-
Include the remove-resource-requirements.yml and remove-ingressgateway-service.yml overlay files in the set of templates to be deployed. This can be achieved by using the following commands:
TMP_DIR=<your-tmp-dir-path> ; mkdir -p ${TMP_DIR} ytt -f config -f config-optional/remove-resource-requirements.yml -f config-optional/remove-ingressgateway-service.yml -f <cf_install_values_path> > ${TMP_DIR}/cf-for-k8s-rendered.yml kapp deploy -a cf -f ${TMP_DIR}/cf-for-k8s-rendered.yml -y
-
-
Make sure you've installed a metrics-server.
- this may be as simple as running something like
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.3.6/components.yaml
- this may be as simple as running something like
-
Once the
kapp deploy
succeeds, you should be able to runcf api api.vcap.me --skip-ssl-validation
, etc
-
Start minikube using the docker driver:
minikube start --cpus=4 --memory=8g --kubernetes-version=1.16.8 --driver=docker
-
Obtain minikube IP.
minikube ip
- The domain used for the installation will use this IP with the following format
<minikube ip>.nip.io
.
- The domain used for the installation will use this IP with the following format
-
Use minikube tunnel to expose the LoadBalancer service for the ingress gateway:
minikube tunnel
- This should be run in a separate terminal as this will block.
- The
kapp deploy
command will not exit successfully until this command is run to allow minikube to create the LoadBalancer service.
-
Follow the instructions in Deploying CF for K8s.
-
Use
<minikube ip>.nip.io
as the domain for the installation. This means that you do not have to configure DNS for the domain. -
Include the remove-resource-requirements.yml overlay file in the set of templates to be deployed. This can be achieved by using the following commands:
TMP_DIR=<your-tmp-dir-path> ; mkdir -p ${TMP_DIR} ytt -f config -f config-optional/remove-resource-requirements.yml -f <cf_install_values_path> > ${TMP_DIR}/cf-for-k8s-rendered.yml kapp deploy -a cf -f ${TMP_DIR}/cf-for-k8s-rendered.yml -y
-
-
You will be able to target your CF CLI to point to the new CF instance
cf api --skip-ssl-validation https://api.<minikube ip>.nip.io
-
To access the kubelet's docker engine, run:
eval $(minikube docker-env) docker ps ...