ageapps / k8s-storage-buckets

k8s-storage-buckets using AWS,GCP and Azure's distributed filesystems
12 stars 4 forks source link

Persistence Storage Volume for GCP k8s #1

Open coolpalani opened 6 years ago

coolpalani commented 6 years ago

I have deployed the K8s on GCP. How do we provision persistence storage or Loadbalancer from GCP. Could you provide some details. I didn't see any proper documents. Even In kubernetes.io site also, they are providing details only for AWS, OpenStack.

In this below link, they had explained detail for OpenStack.

https://medium.com/@bugosip/kubeadm-openstack-cloud-provider-using-kubernetes-1-9-24882f43fab6

I am looking something similar to GCP. :)

Thanks in advance.

ageapps commented 6 years ago

Sorry it took me so long to answer.

Since k8s version 1.8 things related to this have changed. Looking at the documentation (https://kubernetes.io/docs/concepts/storage/storage-classes/) the storage privisioning is done using the StorageClass resource inside K8s where you can specify several parameters like the provisioner (in your case 'GCEPersistentDisk'). Another thing you should look are the Storage Claims inside k8s (https://kubernetes.io/docs/concepts/storage/persistent-volumes).

Regarding the LoadBalancers, as you know, there are several ways to expose a k8s service outside of your cluster, as far as i know, there are 2 that provision a LoadBalancer inside Google's cloud plattform. In both cases k8s internally uses its integration with the corresponding cloud provider in order to get the resources needed:

In any case, it's important to note that K8s is a solution that is usually deployed on top of a cloud infrastructure and the main Cloud Providers have their own products integrated inside the k8s ecosystem making posible to manage some resources like storage, ingresses, security, etc from inside your cluster.

I hope it helps in any way