Skip to content

Commit 0161a0b

Browse files
Merge pull request #4484 from vespa-engine/morio/improve-installation-docs
kubernetes-operator: Improve MiniKube setup section
2 parents 2667d57 + ca40eee commit 0161a0b

2 files changed

Lines changed: 60 additions & 1 deletion

File tree

_data/sidebar.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,8 @@ docs:
420420
url: /en/operations/kubernetes/vespa-on-kubernetes.html
421421
- page: Architecture
422422
url: /en/operations/kubernetes/architecture.html
423+
- page: Vespa on Kubernetes
424+
url: /en/operations/kubernetes/installation.html
423425
- page: Lifecycle Operations for Vespa on Kubernetes
424426
url: /en/operations/kubernetes/operations.html
425427
- page: Enable TLS Encryption for Vespa on Kubernetes

en/operations/kubernetes/installation.html

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ <h2>MiniKube Setup</h2>
5959

6060
<pre>
6161
# Start Minikube
62-
minikube start --nodes 8 --cpus 2 --memory 4GiB --driver=podman --insecure-registry="192.168.49.0/24"
62+
minikube start --nodes 8 --cpus 2 --memory 4GiB --driver=podman
6363

6464
# Enable Image Registry add-on
6565
minikube addons enable registry
@@ -107,6 +107,36 @@ <h2>MiniKube Setup</h2>
107107
export OCI_IMAGE_TAG=$VESPA_VERSION
108108
</pre>
109109

110+
<p>
111+
Then, install the <a href="https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner">Local Persistent Volume</a> provisioner Helm Chart.
112+
This will allow Persistent Volumes to be created in a MiniKube environment. It will automatically create a StorageClass called `local-storage`, which should be
113+
used for the next steps.
114+
</p>
115+
116+
<pre>
117+
# Clone the local persistent volume static provisioner from the Kubernetes sigs
118+
$ git clone git@github.com:kubernetes-sigs/sig-storage-local-static-provisioner.git
119+
120+
# Deploy onto the Kubernetes cluster
121+
$ helm install -f helm/examples/baremetal-default-storage.yaml local-volume-provisioner --namespace kube-system ./helm/provisioner
122+
123+
# Create several volumes on each Minikube node.
124+
$ for n in minikube minikube-m02 minikube-m03 minikube-m04 minikube-m05 minikube-m06 minikube-m07 minikube-m08; do
125+
echo "==> $n"
126+
minikube ssh -n "$n" -- '
127+
set -e
128+
for i in 1 2 3 4; do
129+
sudo mkdir -p /mnt/disks/vol$i
130+
if ! mountpoint -q /mnt/disks/vol$i; then
131+
sudo mount --bind /mnt/disks/vol$i /mnt/disks/vol$i
132+
fi
133+
done
134+
echo "Mounted:"
135+
mount | grep -E "/mnt/disks/vol[1-4]" || true
136+
'
137+
done
138+
</pre>
139+
110140
<h2 id="install-helm-chart">Deploy Vespa Operator</h2>
111141
<p>
112142
The Helm Chart installs the Vespa Operator and the <code>Role</code>, <code>RoleBinding</code>, and <code>ServiceAccount</code> resources with the necessary permissions to operate Vespa. Optionally, the
@@ -177,6 +207,33 @@ <h2>
177207
endpointType: "NODE_PORT"
178208
</pre>
179209

210+
<p>
211+
An example for MiniKube would be as follows.
212+
</p>
213+
214+
<pre>
215+
# VespaSet configuration for AWS EKS
216+
apiVersion: k8s.ai.vespa/v1
217+
kind: VespaSet
218+
metadata:
219+
name: vespaset-sample
220+
namespace: vespa
221+
spec:
222+
version: $OCI_IMAGE_TAG
223+
224+
configServer:
225+
image: "$OCI_IMAGE_REFERENCE"
226+
storageClass: "local-storage"
227+
generateRbac: false
228+
229+
application:
230+
image: "$OCI_IMAGE_REFERENCE"
231+
storageClass: "local-storage"
232+
233+
ingress:
234+
endpointType: "NODE_PORT"
235+
</pre>
236+
180237
<p>
181238
Note that the <code>$OCI_IMAGE_REFERENCE</code> is shared between the ConfigServer and the Vespa Application Pods.
182239
</p>

0 commit comments

Comments
 (0)