Adapting to Kubernetes
When using the MindIO ACP acceleration service in a container, you need to install the SDK in the container.
- Modify the YAML file for creating a pod. The following uses the /home/testuser/mygpt.yaml file as an example to describe how to add a mapping volume.
- Open the mygpt.yaml file.
vim /home/testuser/mygpt.yaml
- Press i to enter the insert mode and modify the mygpt.yaml file.
- If volumeMounts and volumes do not exist, add all content to the file.
- If volumeMounts and volumes exist, add the content following them.
- (Optional) If DPC is used to access the storage in the environment, add the mapping path of the volume in the container. The content is as follows:
volumeMounts: - mountPath: /opt/oceanstor/dataturbo/sdk/lib/libdpc_nds.so name: mindio-dpc-nds readOnly: false
Do not change /opt/oceanstor/dataturbo/sdk/lib/libdpc_nds.so.
- (Optional) If DPC is used to access storage in the environment, add the declaration of the volume to be mapped to the host as follows:
volumes: - name: mindio-dpc-nds hostPath: path: /opt/oceanstor/dataturbo/sdk/lib/libdpc_nds.so type: File
- Press Esc, type :wq!, and press Enter to save the changes and exit.
- Open the mygpt.yaml file.
- Use the modified YAML file to create a pod.
kubectl apply -f mygpt.yaml
- Log in to the created pod. The following uses the pod named mygptdd in the namespace test-mindio as an example.
kubectl exec -it mygptdd -n test-mindio /bin/bash
- Upload the MindIO ACP SDK to the pod and install the SDK by referring to Installing the MindIO ACP SDK on Compute Nodes.
Parent topic: Usage Guidance