Manage Plugins in Kubernetes Environment
Here's what it takes to manage Digital.ai Deploy plugins on a Deploy cluster that was created using the Operator-based installer:
- Create a temporary pod—
dai-xld-plugin-management
. - Stop all the other Deploy Pods but the newly created pod—
dai-xld-plugin-management
. - Log on (SSH) to the newly create temporary pod—
dai-xld-plugin-management
. - Add or remove plugins using the Plugin Manager CLI.
- Restart all the Deploy pods.
- Delete the temporary pod—
dai-xld-plugin-management
.
Note: This topic uses the default namespace,
digitalai
, for illustrative purposes. Use your own namespace if you have installed Deploy in a custom namespace.
-
Verify the PVC name on you current namespace (it depends on the CR name):
❯ kubectl get pvc -n digitalai
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
data-dai-xld-postgresql-0 Bound pvc-6878064b-aa7e-4bf8-9cef-2d8754181f2d 1Gi RWO vp-azure-aks-test-cluster-disk-storage-class 10m
data-dai-xld-rabbitmq-0 Bound pvc-794e00a7-5689-4cc3-a16b-6e5c15c62f99 1Gi RWO vp-azure-aks-test-cluster-file-storage-class 10m
data-dir-dai-xld-digitalai-deploy-cc-server-0 Bound pvc-7c793808-5792-4ccd-8664-4c9f7614ed2a 1Gi RWO vp-azure-aks-test-cluster-file-storage-class 10m
data-dir-dai-xld-digitalai-deploy-master-0 Bound pvc-bb365ffb-a4eb-4f48-a8ca-2141f2eb4404 1Gi RWO vp-azure-aks-test-cluster-file-storage-class 10m
data-dir-dai-xld-digitalai-deploy-master-1 Bound pvc-6102c45b-2399-49d2-90bc-024befca15ba 1Gi RWO vp-azure-aks-test-cluster-file-storage-class 6m41s
data-dir-dai-xld-digitalai-deploy-worker-0 Bound pvc-97f7dad9-be8c-4d00-8d19-883ba77915ef 1Gi RWO vp-azure-aks-test-cluster-file-storage-class 10m
data-dir-dai-xld-digitalai-deploy-worker-1 Bound pvc-9bed5dc1-6b8c-4c4c-9037-2d257957c4d5 1Gi RWO vp-azure-aks-test-cluster-file-storage-class 9sSuppose the Deploy master's PVC name is
data-dir-dai-xld-digitalai-deploy-master-0
. -
Create a
pod-dai-xld-plugin-management.yaml
file and add the following code to the file:apiVersion: v1
kind: Pod
metadata:
name: dai-xld-plugin-management
spec:
securityContext:
fsGroup: 10001
containers:
- name: sleeper
command: ["/bin/sh"]
args: ["-c", "cp -f /opt/xebialabs/db-libs/postgresql*.jar /opt/xebialabs/xl-deploy-server/lib; sleep 1d;"]
image: xebialabs/xl-deploy:<deploy version>
imagePullPolicy: Always
volumeMounts:
- name: data-dir
mountPath: /opt/xebialabs/xl-deploy-server/work
subPath: work
- name: data-dir
mountPath: /opt/xebialabs/xl-deploy-server/conf
subPath: conf
- name: data-dir
mountPath: /opt/xebialabs/xl-deploy-server/centralConfiguration
subPath: centralConfiguration
- name: data-dir
mountPath: /opt/xebialabs/xl-deploy-server/ext
subPath: ext
- name: data-dir
mountPath: /opt/xebialabs/xl-deploy-server/hotfix/lib
subPath: lib
- name: data-dir
mountPath: /opt/xebialabs/xl-deploy-server/hotfix/plugins
subPath: plugins
- name: data-dir
mountPath: /opt/xebialabs/xl-deploy-server/hotfix/satellite-lib
subPath: satellite-lib
- name: data-dir
mountPath: /opt/xebialabs/xl-deploy-server/log
subPath: log
restartPolicy: Never
volumes:
- name: data-dir
persistentVolumeClaim:
claimName: <deploy PVC name>Replace the placeholders:
<deploy version>
- with your deploy version name<deploy PVC name>
- with the PVC name from the first step
-
Apply the
pod-dai-xld-plugin-management.yaml
file.❯ kubectl apply -f pod-dai-xld-plugin-management.yaml -n digitalai
-
Stop the Deploy pods.
-
Set the number of masters and workers to 0.
-