The official documentation mentions that how to deploy Answer via docker and binary. So how to deploy Answer in k8s?
The official documentation mentions that how to deploy Answer via docker and binary. So how to deploy Answer in k8s?
There are two issues that need to be resolved if you need to deploy answer to k8s.
The first time you deploy answer you need to install, we need to automate the installation by setting environment variables.
FYI: https://answer.dev/docs/env#for-auto-install
Depending on your situation, configure the correct environment variables to complete the installation.
By default without the plugin, Answer saves configuration files, cache, and image files in a local directory. So the data directory needs to be persisted.
So it would be best if you used StatefulSet
and PersistentVolume
. Configure the volume and mount it in the appropriate directory.
For example:
volumeMounts:
- name: data
mountPath: "/data/"
- kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: data
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 2Gi
storageClassName: nfs-client
volumeMode: Filesystem