The steps to enable the dev environment for Vespa on Kubernetes are described in this guide.
This is a one-time irreversible operation. Once a VespaSet has been deployed in the dev environment
configuration, it cannot be reserved.
dev environment is intended for local development, integration testing, and experimentation — not
for production serving.
Contrary to Vespa Cloud, the dev environment must additionally be configured at the VespaSet resource level.
Once this is enabled, any Vespa Cluster that is reconciled through this VespaSet will have a min-availability in their
contenet cluster and node count of 1 for all cluster types.
As such, HA (high-availability) of Vespa Pods is not guaranteed, and availability will be reduced during upgrades. The only exception is the ConfigServer Pods, which must always maintain a replica count of 3 to ensure a quorum.
For more information on Environments, refer to the Vespa Cloud documentation.
The dev environment is activated by adding the following annotation to the VespaSet resource:
| Annotation | Value | Effect |
|---|---|---|
internal.vespa.ai/environment |
dev |
Signals to the ConfigServer that this is a dev environment.
|
$ cat > vespaset-dev.yaml <<EOF
apiVersion: k8s.ai.vespa/v1
kind: VespaSet
metadata:
name: vespaset-dev
namespace: ${NAMESPACE}
annotations:
internal.vespa.ai/environment: "dev"
spec:
version: "${VESPA_VERSION}"
configServer:
image: "${VESPA_OPERATOR_IMAGE}"
storageClass: "local-storage"
generateRbac: false
application:
image: "${VESPA_IMAGE}"
storageClass: "local-storage"
ingress:
endpointType: "NONE"
EOF
$ kubectl apply -f vespaset-dev.yaml
It is then possible to deploy a Vespa Application with minimal resources. An example is shown below.
<?xml version="1.0" encoding="utf-8" ?>
<services version="1.0" xmlns:deploy="vespa" xmlns:preprocess="properties">
<container id="default" version="1.0">
<document-api/>
<search/>
<nodes count="1">
<resources vcpu="2" memory="2Gb" disk="20Gb" />
</nodes>
</container>
<content id="music" version="1.0">
<min-redundancy>1</min-redundancy>
<documents>
<document type="music" mode="index" />
</documents>
<nodes count="1">
<resources vcpu="2" memory="2Gb" disk="20Gb" />
</nodes>
</content>
</services>