Creating a Pod
Create a pod by configuring and applying the YAML file on the Kubernetes management node.
- Create a raw-block-pod.yaml file on the master node.
vi raw-block-pod.yaml
- Press i to enter the insert mode and add the following content to the raw-block-pod.yaml file:
--- apiVersion: v1 kind: Pod metadata: name: pod-with-raw-block-volume spec: containers: - name: fc-container image: fedora:26 command: ["/bin/sh", "-c"] args: ["tail -f /dev/null"] volumeDevices: - name: data devicePath: /dev/xvda volumes: - name: data persistentVolumeClaim: claimName: raw-block-pvc - Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Use the YAML file to create a pod.
kubectl apply -f raw-block-pod.yaml
- Check whether the pod is successfully created.
kubectl get pod
Expected result:

Parent topic: Verifying the Integration