<p>I am trying to use <strong>Oracle Object Storage</strong> as a persistent Volume in <strong>Oracle Kubernetes Engine</strong>.</p>
<p>I have created a Kubernetes cluster and created a public bucket named <code>test-bucket</code>.</p>
<p>My yaml files are:</p>
<p><strong>storage-class.yaml</strong></p>
<pre><code>apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: object-storage
provisioner: oci.oraclecloud.com/object-storage
parameters:
  compartment-id: 
  bucket-name: test-bucket
  access-key: 
  secret-key: 
</code></pre>
<p><strong>pvc.yaml</strong></p>
<pre><code>apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: object-storage-pvc
spec:
  storageClassName: object-storage
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 5Gi
</code></pre>
<p><strong>pod.yaml</strong></p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: object-storage-pod
spec:
  containers:
  - name: object-storage-container
    image: busybox
    command: [&quot;sleep&quot;, &quot;infinity&quot;]
    volumeMounts:
    - name: object-storage
      mountPath: /home/user/data
  volumes:
  - name: object-storage
    persistentVolumeClaim:
      claimName: object-storage-pvc
</code></pre>
<p>I have applied all of the files but I am receiving this error when I create the PVC.</p>
<pre><code>Normal  ExternalProvisioning  3m2s (x26 over 8m53s)  persistentvolume-controller  waiting for a volume to be created, either by external provisioner &quot;oci.oraclecloud.com/object-storage&quot; or manually created by system administrator
</code></pre>
<p>I also tried to create the volume by myself but that also didn't work.</p>
<p>I have tried many different things but I am not sure If I am missing anything here.</p>
<p>Any help would be appreciated.</p>
<p>Thanks</p>

Zunnurain Badar
<p>I don't think that would work, as using object storage as a PVC is currently not supported by OCI.</p>
<p>Here's an alternative that would work, but currently involves manual steps:</p>
<p>Install s3fs on each of your nodes. This will allow you to mount s3 bucket (including OCI's S3) as a mount folder. Then you can mount the volume into your container, using host path. If you restart your nodes, you will need to remmount the bucket, or setup a service to startup on reboot. If you have multiple nodes, or constantly delete/add nodes, it could be a pain.</p>
