Advanced Bacula Backup Proxy Pod Deployment
Warning
This is an advanced topic related to Kubernetes clusters. It is strongly advised against attempting to modify or configure the Bacula Kubernetes Plugin unless you possess a deep understanding of the process.
You can customize the service parameters used for deploying Bacula backup Pods dedicated to Persistent Volume Claim data backup to suit your needs. The plugin uses the following Pod service deployment YAML template to execute the proxy operation pod on the cluster.
apiVersion: v1
kind: Pod
metadata:
name: {podname}
namespace: {namespace}
labels:
app: {podname}
spec:
hostname: {podname}
{nodenameparam}
containers:
- name: {podname}
resources:
limits:
cpu: "1"
memory: "64Mi"
requests:
cpu: "100m"
memory: "16Mi"
image: {image}
env:
- name: PLUGINMODE
value: "{mode}"
- name: PLUGINHOST
value: "{host}"
- name: PLUGINPORT
value: "{port}"
- name: PLUGINTOKEN
value: "{token}"
imagePullPolicy: {imagepullpolicy}
volumeMounts:
- name: {podname}-storage
mountPath: /{mode}
restartPolicy: Never
volumes:
- name: {podname}-storage
persistentVolumeClaim:
claimName: {pvcname}
The above template uses a number of predefined placeholders which will be replaced by corresponding variables during Pod execution preparation. To customize proxy Pod deployment you can change or tune template variables or the template body. Below is a list of all supported variables with short descriptions and requirement conditions.
- podname
This is the predefined Pod name used by a plugin. This variable is required and cannot be customized.
- namespace
This is a Namespace name for which the PVC Data backup is performed. This variable is required and cannot be customized.
- nodenameparam
This is a placeholder for Cluster node name parameter (
nodeName: ...
) used to mount an existing Volume Claim for backup or restore if required for the selected PVC. In most cases this variable is required and cannot be customized.- image
This is a Pod Container image name to execute. You can customize or omit this variable as long as you provide a Container image name required by the cluster.
- mode
This is an operation mode for the Proxy Pod. The supported values are:
backup
andrestore
. This variable is required and cannot be customized.- host
This is an endpoint address which corresponds to the
pluginport=...
Kubernetes plugin parameter. This variable is required. You can customize or omit this variable as long as you provide a value for the PLUGINHOST Container environment.- port
This is an endpoint address which corresponds to the
pluginport=...
Kubernetes plugin parameter. This variable is required. You can customize or omit this variable as long as you provide a value for the PLUGINPORT Container environment.- token
This is an Authorization Token (randomly generated). This variable is required and cannot be customized.
- pvcname
This is the name of the PVC for backup or restore operations. This variable is required and cannot be customized.
You can create the required file:
/opt/bacula/scripts/bacula-backup.yaml
or point to the custom one
using the $DEFAULTPODYAML
environment variable.
See also
Go back to:
Go back to the Kubernetes Installation page.
Go back to the main Kubernetes Plugin page.