Limitations
Persistent volumes are not applicable to standard Orka VMs. They can be consumed only by pods deployed with kubectl, and are called by functions such as attach-disk. If you want to persist the storage of a standard Orka VM, use the VM commit, save, or push operations.Step 1: Request a persistent volume
Contact the MacStadium team and request a persistent volume (PV) for your Orka environment. Work closely with the team to help them create a PV that matches your requirements. Note that at this step, you need to decide on the name of the namespace where the PV will be created.Step 2: Get Kubernetes-ready
You need to install kubectl and configure a namespace with permissions to run custom pods.- If not already installed, install kubectl locally. For example:
- Authenticate with the Orka cluster.
- Set up the namespace for the PV. The name must match the name confirmed with the MacStadium team when requesting the PV. The namespace must have custom pods enabled. Next, you need to move computational resources to the namespace and you need to grant namespace access to the users or service accounts which will be working with the namespace.
Step 3: Create the persistent volume claim
A persistent volume claim (PVC) lets you tap into your persistent volume and consume it. You need to create a basic yaml manifest for the PVC and apply it to the environment.- Create the PVC manifest. For more information, see Kubernetes Documentation: PersistentVolumeClaims. For example:
pvc.yml
- Apply the PVC. Replace pvc.yaml with the complete file path to your own PVC manifest. Replace <NAMESPACE> with the namespace you created earlier.
- Verify that the persistent volume claim is bound to the persistent volume.
Step 4: Deploy a pod that uses the persistent volume
Now that you have created a PVC and bound it to the PV, you can deploy a pod that uses the PV. Create a pod manifest and apply it.- Create the pod manifest. The pod needs to reference both the PV and the PVC. For example:
mypod.yaml
- Apply the pod. Replace mypod.yaml with the complete file path to your pod manifest.
- Verify that the pod is deployed and running.
- Verify that the pod uses the claim and the persistent volume. Look for the data listed for Volumes.
(Optional) Step 5: Deploy a service to handle the networking between your pods and your Orka VMs
If you want to have connectivity between your Orka VMs and any pods deployed with kubectl, you need to deploy a networking service. For more information, see Kubernetes Documentation: Service. Make sure to use the networking information provided in your Orka IP Plan when assigning IPs.What’s next: Delete the PVC and release the PV
When you no longer need to use a PVC and the respective PV, you can delete the PVC to release the PV.- Delete the PVC.
- Contact the MacStadium team.