{"id":3938,"date":"2022-02-06T21:18:26","date_gmt":"2022-02-06T20:18:26","guid":{"rendered":"https:\/\/gokhan-gokalp.com\/?p=3938"},"modified":"2022-02-07T10:13:31","modified_gmt":"2022-02-07T09:13:31","slug":"working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service","status":"publish","type":"post","link":"https:\/\/gokhan-gokalp.com\/tr\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\/","title":{"rendered":"Azure Kubernetes Service \u00fczerinde Azure Files Kullanarak Persistent Volume&#8217;ler ile \u00c7al\u0131\u015fmak"},"content":{"rendered":"<p>Cloud-native olarak geli\u015ftirdi\u011fimiz uygulamalar\u0131m\u0131z\u0131n zaman zaman bir storage \u00fczerinde bir tak\u0131m data&#8217;lara eri\u015febilmeleri, payla\u015fabilmeleri veya depolayabilmeleri gibi farkl\u0131 ihtiya\u00e7lar\u0131 olabilmektedir.<\/p>\n<p>Bildi\u011fimiz gibi containerize olarak <em>Kubernetes<\/em> \u00fczerinde host etti\u011fimiz uygulamalar\u0131m\u0131z, do\u011fas\u0131 gere\u011fi <strong>ephemeral<\/strong>(k\u0131sa \u00f6m\u00fcrl\u00fc) ve <strong>stateless<\/strong>&#8216;d\u0131r. Yani persistent bir storage \u00e7\u00f6z\u00fcm\u00fc kullanmadan container i\u00e7erisinde depolayaca\u011f\u0131m\u0131z herhangi bir data, container silinene kadar hayatta kalacakt\u0131r.<\/p>\n<p>Bu makale kapsam\u0131nda ise <em>Azure<\/em>&#8216;un bizlere fully managed olarak sundu\u011fu<strong><em>\u00a0File<\/em> <em>shares <\/em><\/strong>hizmeti ile bir \u00e7ok container taraf\u0131ndan eri\u015filebilir <strong>persistent<\/strong> bir <strong>volume<\/strong> nas\u0131l olu\u015fturabilece\u011fimize ve container&#8217;lar\u0131m\u0131za bu volume&#8217;\u00fc nas\u0131l mount edebilece\u011fimize k\u0131saca de\u011finece\u011fiz. Ayr\u0131ca olu\u015fturacak oldu\u011fumuz persistent volume&#8217;\u00fcn, d\u0131\u015far\u0131dan gelebilecek potansiyel g\u00fcvenlik tehdit&#8217;lerine kar\u015f\u0131 nas\u0131l g\u00fcvenli bir hale getirilebilece\u011finden de k\u0131saca bahsedece\u011fiz.<\/p>\n<h2>Ba\u015flamadan<\/h2>\n<p>Bu makale i\u00e7in a\u015fa\u011f\u0131daki ortam ve tool&#8217;lar gerekmektedir.<\/p>\n<ul>\n<li>Azure Kubernetes Service<\/li>\n<li>Azure CLI<\/li>\n<li>Kubectl<\/li>\n<\/ul>\n<h2>Kubernetes Volumes<\/h2>\n<p><em>Kubernetes<\/em> data kayb\u0131 gibi bir \u00e7ok problemleri \u00e7\u00f6zen iyi bir volume abstraction model&#8217;ine ve farkl\u0131 volume type&#8217;lar\u0131n\u0131 kullanabilmemize olanak sa\u011flayan bir yap\u0131ya sahiptir. Bu esnek yap\u0131s\u0131 ile pod&#8217;lar i\u00e7erisinde farkl\u0131 type&#8217;lara sahip volume&#8217;leri ayn\u0131 anda kullanabilmekteyiz.<\/p>\n<p>Volume&#8217;leri <em>Kubernetes<\/em> i\u00e7erisinde <strong>Ephemeral<\/strong> ve <strong>Persistent<\/strong> olarak kategorize edebiliriz. Ephemeral&#8217;\u0131n ya\u015fam d\u00f6ng\u00fcs\u00fc bir pod&#8217;a ba\u011fl\u0131yken, persistent&#8217;\u0131n ya\u015fam d\u00f6ng\u00fcs\u00fc ise herhangi bir pod&#8217;a ba\u011fl\u0131 de\u011fildir. Ek olarak<em>\u00a0Kubernetes<\/em> volume&#8217;leri olu\u015fturulurken <strong>statically<\/strong> olarak bir cluster administrator&#8217;\u0131 taraf\u0131ndan veya <strong>dynamically\u00a0<\/strong>olarak <em>Kubernetes API<\/em>&#8216;\u0131 taraf\u0131ndan olu\u015fturulabilmektedir.<\/p>\n<p>Bu makale kapsam\u0131nda ise <em>PersistentVolume<\/em> ve <em>PersistentVolumeClaim<\/em> resource&#8217;lar\u0131n\u0131 kullanarak statically olarak olu\u015fturulmu\u015f <em>Azure File<\/em> <em>shares<\/em> hizmetini bir pod&#8217;a nas\u0131l mount edebilece\u011fimize bakaca\u011f\u0131z.<\/p>\n<h2>Azure File Share&#8217;i Olu\u015ftural\u0131m<\/h2>\n<p><em>Azure Files<\/em> bizlere <strong>SMB<\/strong> veya <strong>NFS<\/strong> protokolleri \u00fczerinden eri\u015filebilen, fully managed bir file share hizmeti sunmaktad\u0131r. \u00d6zellikle bir cloud ortam\u0131na migration s\u00fcrecinde isek, <em>Azure Files<\/em>&#8216;\u0131n on-prem ortamlar\u0131m\u0131zda da \u00e7al\u0131\u015fabilme esnekli\u011fi veya <strong>SMB<\/strong> protokol\u00fc \u00fczerinden uygulamalar\u0131m\u0131za mount edilebilmesi sayesinde uygulamalar\u0131m\u0131z\u0131n kolay bir \u015fekilde cloud ortam\u0131na migrate olabilme s\u00fcre\u00e7lerini kolayla\u015ft\u0131rmaktad\u0131r.<\/p>\n<p><em>Azure File<\/em> <em>shares<\/em> hizmeti i\u00e7in \u00f6ncelikle bir storage account olu\u015fturmam\u0131z gerekmektedir. Ard\u0131ndan <em>File shares<\/em>&#8216;i olu\u015fturabilece\u011fiz. Bu i\u015flemleri <em>Azure CLI<\/em> \u00fczerinden a\u015fa\u011f\u0131daki gibi ger\u00e7ekle\u015ftirelim.<\/p>\n<div>\n<pre>az storage account create -n STORAGE_ACCOUNT_NAME -g RESOURCE_GROUP -l LOCATION --sku Standard_LRS<\/pre>\n<\/div>\n<div>Ben bu noktada \u00f6rnek olmas\u0131 a\u00e7\u0131s\u0131ndan &#8220;<em>Standard_LRS<\/em>&#8221; <em>SKU<\/em>&#8216;sunu kulland\u0131m. E\u011fer <em><strong>AKS<\/strong><\/em> hizmetini y\u00fcksek eri\u015filebilirlik a\u00e7\u0131s\u0131ndan <strong><em>Availability Zones<\/em><\/strong> ile kullan\u0131yorsan\u0131z, storage account&#8217;u olu\u015ftururken &#8220;<em>Locally Redundant<\/em>&#8221; yerine &#8220;<em>Zone Redundant<\/em>&#8221; <em>SKU<\/em>&#8216;lar\u0131 tercih etmenizi \u00f6neririm. Aksi bir durumda resoruce&#8217;lar farkl\u0131 zone&#8217;lar \u00fczerinde available olabilece\u011finden dolay\u0131, volume mount i\u015flemleri s\u0131ras\u0131nda problemlerle kar\u015f\u0131la\u015fabilirsiniz. Ek olarak production workload&#8217;lar\u0131 i\u00e7in de, <em>SSD<\/em> destekli &#8220;<em>Premium<\/em>&#8221; se\u00e7eneklere y\u00f6nelebilirsiniz.<\/div>\n<div><\/div>\n<div>Storage account&#8217;u istedi\u011fimiz bir isim ile olu\u015fturduktan sonra, <em>File shares<\/em> hizmetini olu\u015fturabilmek i\u00e7in connection string&#8217;ini export edelim ve ard\u0131ndan <em>File shares<\/em> hizmetini olu\u015ftural\u0131m.<\/div>\n<div>\n<pre>export AZURE_STORAGE_CONNECTION_STRING=$(az storage account show-connection-string -n STORAGE_ACCOUNT_NAME -g RESOURCE_GROUP -o tsv)\r\n\r\naz storage share create -n STORAGE_ACCOUNT_NAME --connection-string $AZURE_STORAGE_CONNECTION_STRING<\/pre>\n<div>\u0130\u015flemleri tamamlad\u0131ktan sonra <em>Azure Portal<\/em> \u00fczerinden olu\u015fturmu\u015f oldu\u011funuz storage account&#8217;u ve <em>File shares<\/em> hizmetini kontrol edebiliriz.<\/div>\n<div><a href=\"\/wp-content\/uploads\/2022\/01\/fileshare-azure-portal.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-3942 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/01\/fileshare-azure-portal.jpg\" alt=\"\" width=\"2242\" height=\"636\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/fileshare-azure-portal.jpg 2242w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/fileshare-azure-portal-300x85.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/fileshare-azure-portal-1024x290.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/fileshare-azure-portal-768x218.jpg 768w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/fileshare-azure-portal-1536x436.jpg 1536w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/fileshare-azure-portal-2048x581.jpg 2048w\" data-sizes=\"(max-width: 2242px) 100vw, 2242px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 2242px; --smush-placeholder-aspect-ratio: 2242\/636;\" \/><\/a><\/div>\n<\/div>\n<h2>Microsoft Defender for Storage<\/h2>\n<p>\u015eimdi ise olu\u015fturmu\u015f oldu\u011fumuz <em>File shares <\/em>hizmetini, d\u0131\u015far\u0131dan gelebilecek tehdit&#8217;lere, istenmeyen eri\u015fimlere kar\u015f\u0131 <em>Microsoft Defender<\/em> ile nas\u0131l g\u00fcvenli bir hale getirebilece\u011fimize h\u0131zl\u0131ca bir bakal\u0131m.<\/p>\n<p><em>Microsoft Defender<\/em>, hem <em>Azure-native<\/em> hem de <em>hybrid<\/em> ortamlar\u0131m\u0131zdaki g\u00fcvenlik tehditlerine kar\u015f\u0131 bir korumaya sahip olabilece\u011fimiz geli\u015fmi\u015f bir tehdit koruma tool&#8217;udur. Biz olu\u015fturmu\u015f oldu\u011fumuz <em>File shares<\/em> hizmetini koruma alt\u0131na alabilmek i\u00e7in ise, <em>Microsoft Defender&#8217;<\/em>\u0131n storage i\u00e7in olan native ak\u0131ll\u0131 g\u00fcvenlik katman\u0131ndan yararlanaca\u011f\u0131z.<\/p>\n<div>K\u0131saca bu ak\u0131ll\u0131 katman, bir g\u00fcvenlik uzman\u0131 yeteneklerine sahip olmadan d\u0131\u015far\u0131dan gelebilecek potansiyel tehdit&#8217;lere kar\u015f\u0131 bir korumaya sahip olmam\u0131z\u0131 sa\u011flamaktad\u0131r. Bu i\u015flemi ise <em>Azure Blob Storage<\/em> ve <em>Azure Files<\/em> hizmeti taraf\u0131ndan \u00fcretilen telemetry verilerini s\u00fcrekli analyze ederek ger\u00e7ekle\u015ftirmektedir. Herhangi bir g\u00fcvenlik tehdit&#8217;i tespit etti\u011finde ise, portal \u00fczerinde g\u00fcvenlik uyar\u0131lar\u0131 olu\u015fturmaktad\u0131r.<\/div>\n<div><\/div>\n<div><em>Microsoft Defender for Storage<\/em>&#8216;\u0131 ister subscription seviyesinde, istersek de se\u00e7ece\u011fimiz resource&#8217;lar seviyesinde etkinle\u015ftirebilmek m\u00fcmk\u00fcnd\u00fcr. \u015eimdi a\u015fa\u011f\u0131daki komutlar\u0131 kullanarak, olu\u015fturmu\u015f oldu\u011fumuz storage account \u00f6zelinde geli\u015fmi\u015f g\u00fcvenlik korumas\u0131n\u0131 etkinle\u015ftirelim.<\/div>\n<div>\n<div>\n<pre>az security atp storage update --resource-group RESOURCE_GROUP --storage-account STORAGE_ACCOUNT_NAME --is-enabled true<\/pre>\n<\/div>\n<\/div>\n<div><a href=\"\/wp-content\/uploads\/2022\/01\/microsoft-defender.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-3952 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/01\/microsoft-defender.jpg\" alt=\"\" width=\"2330\" height=\"222\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/microsoft-defender.jpg 2330w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/microsoft-defender-300x29.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/microsoft-defender-1024x98.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/microsoft-defender-768x73.jpg 768w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/microsoft-defender-1536x146.jpg 1536w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/microsoft-defender-2048x195.jpg 2048w\" data-sizes=\"(max-width: 2330px) 100vw, 2330px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 2330px; --smush-placeholder-aspect-ratio: 2330\/222;\" \/><\/a><\/div>\n<div>G\u00f6rd\u00fc\u011f\u00fcm\u00fcz gibi &#8220;<em>mydocumentstrg<\/em>&#8221; ad\u0131nda olu\u015fturmu\u015f oldu\u011fum storage account i\u00e7in geli\u015fmi\u015f g\u00fcvenlik korumas\u0131 etkinle\u015ftirilmi\u015f durumda.<\/div>\n<div><\/div>\n<div><em>Microsoft Defender for Storage<\/em>&#8216;\u0131n sevdi\u011fim taraf\u0131, portal \u00fczerinden ilgili storage account&#8217;un &#8220;<em>Security<\/em>&#8221; sekmesine girdi\u011fimizde, o storage account&#8217;un genel bir g\u00fcvenlik durumu hakk\u0131nda h\u0131zl\u0131 bir \u015fekilde bilgi sahibi olabiliyor veya nas\u0131l daha g\u00fcvenli bir hale getirebilece\u011fimiz hakk\u0131ndaki \u00f6nerilere eri\u015febiliyoruz. Ayr\u0131ca integration&#8217;lar olu\u015fturarak herhangi bir uyar\u0131 kar\u015f\u0131s\u0131nda farkl\u0131 aksiyonlar da ger\u00e7ekle\u015ftirebilmek m\u00fcmk\u00fcnd\u00fcr.<img decoding=\"async\" class=\"aligncenter size-full wp-image-3954 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/01\/security-portal-scaled.jpg\" alt=\"\" width=\"2560\" height=\"1581\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/security-portal-scaled.jpg 2560w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/security-portal-300x185.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/security-portal-1024x632.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/security-portal-768x474.jpg 768w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/security-portal-1536x949.jpg 1536w\" data-sizes=\"(max-width: 2560px) 100vw, 2560px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 2560px; --smush-placeholder-aspect-ratio: 2560\/1581;\" \/><\/div>\n<p>Zararl\u0131 i\u00e7eriklere kar\u015f\u0131 koruma a\u00e7\u0131s\u0131ndan ho\u015flanmad\u0131\u011f\u0131m y\u00f6n\u00fc ise, upload edilen her bir dosyay\u0131 tek tek taramamas\u0131d\u0131r. Onun yerine <em>Azure Blob Storage<\/em> ve <em>Azure Files<\/em>\u00a0hizmetleri taraf\u0131ndan \u00fcretilen telemetry verilerini analyze ederek, bilinen vir\u00fcs veya trojan t\u00fcrleri i\u00e7in <strong>hash<\/strong> <strong>scanning<\/strong> yapmaktad\u0131r. Ayr\u0131ca <em>SMB<\/em> protokol\u00fc \u00fczerinden yap\u0131lan upload i\u015flemlerini de \u015fimdilik desteklememektedir.<\/p>\n<h2>PersistentVolume ve PersistentVolumeClaim ile \u00c7al\u0131\u015fmak<\/h2>\n<p><em>PersistentVolume<\/em>, normal bir volume&#8217;\u00fcn aksine herhangi bir pod&#8217;dan ba\u011f\u0131ms\u0131z olarak kendi lifecycle&#8217;\u0131na sahip olan bir <em>Kubernetes<\/em> storage resource&#8217;udur. <em>PersistentVolumeClaim<\/em> ise bir pod&#8217;a <em>PersistentVolume<\/em>&#8216;\u00fcn mount edilebilmesi i\u00e7in kullan\u0131lmaktad\u0131r.<\/p>\n<p>K\u0131sacas\u0131 bir uygulaman\u0131n persistent bir storage&#8217;a ihtiyac\u0131 oldu\u011funda, ilgili kullan\u0131c\u0131 <em>PersistentVolumeClaim<\/em>&#8216;i kullanarak arka plandaki storage hakk\u0131nda detayl\u0131 bir bilgi sahibi olmadan ilgili uygulama i\u00e7in bir storage request edebilmektedir.<\/p>\n<div>\u0130lk olarak<em> Kubernetes<\/em>\u00a0olu\u015fturmu\u015f oldu\u011fumuz <em>File shares<\/em>&#8216;e eri\u015febilmek i\u00e7in, onun credential bilgilerine ihtiya\u00e7 duymaktad\u0131r. Bunun i\u00e7in a\u015fa\u011f\u0131daki gibi <em>Kubernetes<\/em> cluster&#8217;\u0131 i\u00e7erisinde storage&#8217;\u0131n credential bilgilerini i\u00e7eren, &#8220;<em>storage-account<\/em>&#8221; ad\u0131nda bir <strong>secret<\/strong> objesi olu\u015ftural\u0131m.<\/div>\n<div>\n<div>\n<pre>STORAGE_KEY=$(az storage account keys list --resource-group RESOURCE_GROUP --account-name mydocumentstrg --query \"[0].value\" -o tsv)\r\n\r\nkubectl create secret generic storage-account --from-literal=azurestorageaccountname=mydocumentstrg --from-literal=azurestorageaccountkey=$STORAGE_KEY<\/pre>\n<\/div>\n<\/div>\n<p>\u015eimdi a\u015fa\u011f\u0131daki i\u00e7eri\u011fe sahip &#8220;<em>pv-pvc<\/em>&#8221; ad\u0131nda bir <em>yaml<\/em> dosyas\u0131 haz\u0131rlayal\u0131m.<\/p>\n<div>\n<pre>apiVersion: v1\r\nkind: PersistentVolume\r\nmetadata:\r\n  name: azurefile\r\nspec:\r\n  capacity:\r\n    storage: 5Gi\r\n  accessModes:\r\n    - ReadWriteMany\r\n  azureFile:\r\n    secretName: storage-account\r\n    shareName: mydocumentstrg\r\n    readOnly: false\r\n  persistentVolumeReclaimPolicy: Retain\r\n---\r\napiVersion: v1\r\nkind: PersistentVolumeClaim\r\nmetadata:\r\n  name: azurefile\r\nspec:\r\n  accessModes:\r\n    - ReadWriteMany\r\n  storageClassName: \"\"\r\n  resources:\r\n    requests:\r\n      storage: 5Gi\r\n<\/pre>\n<\/div>\n<p>Yukar\u0131da k\u0131saca neler yapt\u0131\u011f\u0131m\u0131za bir bakal\u0131m.<\/p>\n<ul>\n<li><em>PersistentVolume<\/em>&#8216;\u00fcn \u00f6rnek olarak <strong>5Gi<\/strong> l\u0131k bir kapasiteye sahip oldu\u011funu belirttik.<\/li>\n<li>Read-write olarak birden fazla node taraf\u0131ndan <em>PersistentVolume<\/em>&#8216;\u00fcn mount edilebilmesi i\u00e7in &#8220;<em>accessModes<\/em>&#8221; se\u00e7ene\u011fini ise &#8220;<em>ReadWriteMany<\/em>&#8221; olarak ayarlad\u0131k.<\/li>\n<li>Storage plugin&#8217;i olarak \u00f6nceden olu\u015fturmu\u015f oldu\u011fumuz <em>Azure Files<\/em> hizmetini kullanaca\u011f\u0131m\u0131z i\u00e7in, <em>File shares<\/em> hizmetinin &#8220;<em>shareName<\/em>&#8221; ve &#8220;<em>secretName<\/em>&#8221; bilgilerini de referans olarak g\u00f6sterdik.<\/li>\n<li>Ayr\u0131ca &#8220;<em>persistentVolumeReclaimPolicy<\/em>&#8221; se\u00e7ene\u011fini ise &#8220;<em>Retain<\/em>&#8221; olarak belirledik. B\u00f6ylece <em>PersistentVolumeClaim<\/em> silindi\u011finde <em>PersistentVolume<\/em> ilgili data&#8217;lar ile beraber silinmemi\u015f olacak.<\/li>\n<\/ul>\n<p>K\u0131sacas\u0131 <em>PersistentVolume<\/em> ile cluster i\u00e7erisinde <strong>5Gi<\/strong> l\u0131k kapasiteye sahip bir storage resource&#8217;u olu\u015fturmu\u015f olaca\u011f\u0131z.<\/p>\n<p><em>PersistentVolumeClaim<\/em>&#8216;i ise bir developer olarak istedi\u011fimiz bir pod spec&#8217;inde referans olarak g\u00f6stererek, <strong>5Gi<\/strong> kapasiteye sahip bir persistent storage request etmek i\u00e7in kullanaca\u011f\u0131z. Ayr\u0131ca &#8220;<em>storageClassName<\/em>&#8221; sat\u0131r\u0131n\u0131 bo\u015f set ederek, storage&#8217;\u0131n dynamically olarak olu\u015fturulmamas\u0131n\u0131 da sa\u011flam\u0131\u015f olduk.<\/p>\n<p>E\u011fer storage account&#8217;un static olarak de\u011filde <em>Kubernetes<\/em> taraf\u0131ndan dynamically olarak olu\u015fturulmas\u0131n\u0131 isteseydik, <em>PersistentVolume<\/em> resource&#8217;u yerine istedi\u011fimiz kriterlere sahip bir <em>StorageClass<\/em> resource&#8217;u olu\u015fturmam\u0131z ve bu resource&#8217;u kullanacak bir <em>PersistentVolumeClaim<\/em> tan\u0131mlamam\u0131z gerekecekti.<\/p>\n<blockquote><p><em><strong>NOT<\/strong><\/em>: E\u011fer <em>PersistentVolumeClaim<\/em>&#8216;in \u00f6nceden olu\u015fturmu\u015f oldu\u011fumuz specific bir <em>PersistentVolume<\/em>\u00a0ile bind olmas\u0131n\u0131 istiyorsak, &#8220;<em>volumeName<\/em>&#8221; attribute&#8217;\u00fcn\u00fc set ederek bu i\u015flemi ger\u00e7ekle\u015ftirebiliriz. \u00d6rne\u011fin farkl\u0131 scalability ve performance tier&#8217;lar\u0131na sahip olan hizmetlere\u00a0sahip olabiliriz.<\/p><\/blockquote>\n<p>\u015eimdi a\u015fa\u011f\u0131daki komutlar\u0131 terminal \u00fczerinden execute edelim ve olu\u015fturulan resource&#8217;lara bir g\u00f6z atal\u0131m.<\/p>\n<pre>kubectl apply -f pv-pvc.yaml<\/pre>\n<pre>kubectl get pv azurefile\r\nkubectl get pvc azurefile\r\nkubectl describe pvc azurefile<\/pre>\n<p><a href=\"\/wp-content\/uploads\/2022\/01\/pv-pvc-created.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-3950 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/01\/pv-pvc-created.jpg\" alt=\"\" width=\"1730\" height=\"680\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/pv-pvc-created.jpg 1730w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/pv-pvc-created-300x118.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/pv-pvc-created-1024x402.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/pv-pvc-created-768x302.jpg 768w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/01\/pv-pvc-created-1536x604.jpg 1536w\" data-sizes=\"(max-width: 1730px) 100vw, 1730px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1730px; --smush-placeholder-aspect-ratio: 1730\/680;\" \/><\/a><\/p>\n<p>Yukar\u0131da da g\u00f6rd\u00fc\u011f\u00fcm\u00fcz gibi <strong>azurefile<\/strong> <em>PersistentVolumeClaim<\/em>&#8216;i, <strong>azurefile<\/strong> <em>PersistentVolume<\/em>&#8216;\u00fcne ba\u015far\u0131l\u0131 bir \u015fekilde &#8220;<em>bound<\/em>&#8221; oldu. E\u011fer &#8220;<em>Used By<\/em>&#8221; k\u0131sm\u0131na dikkat edersek, hen\u00fcz herhangi bir pod taraf\u0131ndan referans edilmedi\u011fi i\u00e7in &#8220;<em>none<\/em>&#8221; oldu\u011funu g\u00f6rebiliriz.<\/p>\n<p>\u015eimdi \u00f6rnek uygulamam\u0131z\u0131 deploy etme a\u015famas\u0131na ge\u00e7ebiliriz.<\/p>\n<p>Ben \u00f6rnek olmas\u0131 a\u00e7\u0131s\u0131ndan <em><strong>.NET 6<\/strong><\/em> ile olu\u015fturmu\u015f oldu\u011fum a\u015fa\u011f\u0131daki basit console uygulamas\u0131n\u0131 <em>Kubernetes<\/em> \u00fczerine deploy edece\u011fim.<\/p>\n<pre>using (StreamWriter writer = File.CreateText(\"\/mnt\/azure\/mytext.txt\"))\r\n{\r\nawait writer.WriteLineAsync(\"hello\");\r\n} \r\nawait Task.Delay(TimeSpan.FromHours(1));\r\n\r\n<\/pre>\n<p>Top-level statements ile h\u0131zl\u0131 bir \u015fekilde k\u00fc\u00e7\u00fck ve basitle\u015ftirilmi\u015f uygulamalar geli\u015ftirebilmek, ne kadar g\u00fczel de\u011fil mi? Bu basit uygulama ile, &#8220;\/mnt\/azure\/&#8221; path&#8217;i alt\u0131nda basit bir txt dosyas\u0131 olu\u015fturaca\u011f\u0131z. Bu path&#8217;e ise birazdan <em>File shares<\/em> hizmeti mount edece\u011fiz.<\/p>\n<p><em>Dockerfile<\/em> dosyas\u0131 ise a\u015fa\u011f\u0131daki gibidir.<\/p>\n<pre>FROM mcr.microsoft.com\/dotnet\/runtime:6.0 AS base\r\nWORKDIR \/app\r\n\r\nFROM mcr.microsoft.com\/dotnet\/sdk:6.0 AS build\r\nWORKDIR \/src\r\nCOPY [\"MyDocumentConsoleApp\/MyDocumentConsoleApp.csproj\", \"MyDocumentConsoleApp\/\"]\r\nRUN dotnet restore \"MyDocumentConsoleApp\/MyDocumentConsoleApp.csproj\"\r\nCOPY . .\r\nWORKDIR \"\/src\/MyDocumentConsoleApp\"\r\nRUN dotnet build \"MyDocumentConsoleApp.csproj\" -c Release -o \/app\/build\r\n\r\nFROM build AS publish\r\nRUN dotnet publish \"MyDocumentConsoleApp.csproj\" -c Release -o \/app\/publish\r\n\r\nFROM base AS final\r\nWORKDIR \/app\r\nCOPY --from=publish \/app\/publish .\r\nENTRYPOINT [\"dotnet\", \"MyDocumentConsoleApp.dll\"]\r\n<\/pre>\n<p>\u00d6ncelikle a\u015fa\u011f\u0131daki gibi basit bir deployment spec&#8217;i tan\u0131mlayal\u0131m.<\/p>\n<pre>apiVersion: apps\/v1\r\nkind: Deployment\r\nmetadata:\r\n  name: mydocumentapp-deployment\r\n  labels:\r\n    app: mydocumentapp\r\nspec:\r\n  replicas: 1\r\n  selector:\r\n    matchLabels:\r\n      app: mydocumentapp\r\n  template:\r\n    metadata:\r\n      labels:\r\n        app: mydocumentapp\r\n    spec:\r\n      containers:\r\n      - name: mydocumentapp\r\n        image: YOUR_ACR.azurecr.io\/mydocumentapp:v1\r\n        volumeMounts:\r\n        - name: azurefileshare\r\n          mountPath: \/mnt\/azure\r\n      volumes:\r\n      - name: azurefileshare\r\n        persistentVolumeClaim:\r\n          claimName: azurefile<\/pre>\n<p>\u00d6rnek uygulamam\u0131z\u0131 deploy edebilmek i\u00e7in tan\u0131mlam\u0131\u015f oldu\u011fumuz bu basit spec&#8217;de, &#8220;<em>volumes<\/em>&#8221; b\u00f6l\u00fcm\u00fc alt\u0131nda daha \u00f6nce olu\u015fturmu\u015f oldu\u011fumuz &#8220;<em>azurefile<\/em>&#8221; isimli <em>PersistentVolumeClaim<\/em>&#8216;i kullanarak bir volume request ediyoruz. Ayr\u0131ca bu volume&#8217;\u00fc container i\u00e7erisinde mount etmek istedi\u011fimiz path&#8217;i de belirtiyoruz.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/02\/pv-pvc-diagram.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-3971 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/02\/pv-pvc-diagram.jpg\" alt=\"\" width=\"621\" height=\"221\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/pv-pvc-diagram.jpg 621w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/pv-pvc-diagram-300x107.jpg 300w\" data-sizes=\"(max-width: 621px) 100vw, 621px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 621px; --smush-placeholder-aspect-ratio: 621\/221;\" \/><\/a><\/p>\n<p>B\u00f6ylece <em>Kubernetes<\/em> control plane, bu pod i\u00e7in <em>PersistentVolumeClaim<\/em> i\u00e7erisinde tan\u0131mlam\u0131\u015f oldu\u011fumuz kriterlere\u00a0sahip bir <em>PersistentVolume<\/em> bulmaya \u00e7al\u0131\u015facakt\u0131r. Ba\u015far\u0131yla uygun bir <em>PersistentVolume<\/em> buldu\u011funda ise, <em>PersistentVolumeClaim<\/em>&#8216;i ilgili volume&#8217;a bind edecektir. Aksi bir durumda ise uygun bir <em>PersistentVolume<\/em> bulunamayaca\u011f\u0131\u00a0i\u00e7in ilgili pod schedule edilemeyecektir.<\/p>\n<p>\u015eimdi a\u015fa\u011f\u0131daki gibi uygulamay\u0131 deploy edelim ve container i\u00e7erisindeki &#8220;<em>\/mnt\/azure\/mytext.txt<\/em>&#8221; dosyan\u0131n i\u00e7eri\u011fini kontrol edelim.<\/p>\n<pre>kubectl apply -f .\/mydocumentapp-deployment.yaml\r\n\r\nkubectl exec -it $(kubectl get pods -l=app=mydocumentapp --output=jsonpath={.items..metadata.name}) -- cat \/mnt\/azure\/mytext.txt\r\n<\/pre>\n<p><a href=\"\/wp-content\/uploads\/2022\/02\/deploy-and-print.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-3967 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/02\/deploy-and-print.jpg\" alt=\"\" width=\"2322\" height=\"114\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/deploy-and-print.jpg 2322w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/deploy-and-print-300x15.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/deploy-and-print-1024x50.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/deploy-and-print-768x38.jpg 768w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/deploy-and-print-1536x75.jpg 1536w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/deploy-and-print-2048x101.jpg 2048w\" data-sizes=\"(max-width: 2322px) 100vw, 2322px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 2322px; --smush-placeholder-aspect-ratio: 2322\/114;\" \/><\/a><\/p>\n<p>G\u00f6rd\u00fc\u011f\u00fcm\u00fcz gibi uygulamam\u0131z mount etti\u011fimiz <em>File shares<\/em> hizmeti \u00fczerinde tan\u0131mlad\u0131\u011f\u0131m\u0131z &#8220;<em>mytext.txt<\/em>&#8221; dosyas\u0131n\u0131 ba\u015far\u0131yla olu\u015fturmu\u015f. Art\u0131k olu\u015fturulan bu dosya, persistent bir \u015fekilde <em>Azure File<\/em> <em>shares<\/em> hizmeti \u00fczerinde bar\u0131nd\u0131r\u0131lmaktad\u0131r. \u0130lgili uygulamalar tekrardan schedule veya scale out\/down edilse dahi, ayn\u0131 <em>File shares<\/em> eri\u015filebilir durumda kalacakt\u0131r.<\/p>\n<p>\u015eimdi olu\u015fturmu\u015f oldu\u011fumuz <em>PersistentVolumeClaim<\/em>&#8216;i a\u015fa\u011f\u0131daki gibi tekrardan describe edelim.<\/p>\n<pre>kubectl describe pvc azurefile<\/pre>\n<p><a href=\"\/wp-content\/uploads\/2022\/02\/describe-pvc.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-3968 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/02\/describe-pvc.jpg\" alt=\"\" width=\"1480\" height=\"450\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/describe-pvc.jpg 1480w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/describe-pvc-300x91.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/describe-pvc-1024x311.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/describe-pvc-768x234.jpg 768w\" data-sizes=\"(max-width: 1480px) 100vw, 1480px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1480px; --smush-placeholder-aspect-ratio: 1480\/450;\" \/><\/a><\/p>\n<p>&#8220;<em>Used By<\/em>&#8221; k\u0131sm\u0131na \u015fimdi bakt\u0131\u011f\u0131m\u0131zda ise, bu claim&#8217;in olu\u015fturmu\u015f oldu\u011fumuz pod taraf\u0131ndan kullan\u0131ld\u0131\u011f\u0131n\u0131 g\u00f6rebiliriz.<\/p>\n<h2>Toparlayal\u0131m<\/h2>\n<p><em>Kubernetes<\/em> i\u00e7erisindeki pod&#8217;lar\u0131n, do\u011fas\u0131 gere\u011fi kolay silinebilen yani k\u0131sa \u00f6m\u00fcrl\u00fc olduklar\u0131n\u0131 s\u00f6yledik. Pod&#8217;lar herhangi bir sebepden dolay\u0131 i\u00e7lerindeki local data&#8217;lar ile birlikte silinebilir, tekrardan schedule edilebilirler. Bu sebeple pod&#8217;lar aras\u0131nda payla\u015f\u0131lacak veya persistent olarak bar\u0131nd\u0131ralacak data&#8217;lar i\u00e7in, persistent volume&#8217;ler kullanmam\u0131z gerekmektedir.<\/p>\n<p>Bu makale kapsam\u0131nda persistent bir storage&#8217;a ihtiya\u00e7 duyan uygulamalar\u0131m\u0131z i\u00e7in, managed olarak \u00f6nceden olu\u015fturmu\u015f oldu\u011fumuz <em>Azure File<\/em> <em>shares<\/em> hizmetini <em>PersistentVolume<\/em> ve <em>PersistentVolumeClaim<\/em> yakla\u015f\u0131m\u0131yla uygulamalar\u0131m\u0131za nas\u0131l mount edebilece\u011fimize k\u0131saca bir g\u00f6z att\u0131k.<\/p>\n<p><em>PersistentVolume<\/em> cluster administrator&#8217;\u0131 taraf\u0131ndan cluster i\u00e7erisine bir storage resource&#8217;u eklemek i\u00e7in kullan\u0131l\u0131rken, <em>PersistentVolumeClaim <\/em>ise bir developer&#8217;\u0131n arkaplanda ne olup bitti\u011fini bilmeden soyut bir \u015fekilde uygulamas\u0131na persistent bir storage request edebilmesi i\u00e7in kullan\u0131lmaktad\u0131r.<\/p>\n<h2>Referanslar<\/h2>\n<p><em>https:\/\/docs.microsoft.com\/en-us\/azure\/storage\/files\/storage-files-introduction<\/em><br \/>\n<em>https:\/\/docs.microsoft.com\/en-us\/azure\/defender-for-cloud\/defender-for-storage-introduction<\/em><br \/>\n<em>https:\/\/kubernetes.io\/docs\/concepts\/storage\/persistent-volumes\/<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cloud-native olarak geli\u015ftirdi\u011fimiz uygulamalar\u0131m\u0131z\u0131n zaman zaman bir storage \u00fczerinde bir tak\u0131m data&#8217;lara eri\u015febilmeleri, payla\u015fabilmeleri veya depolayabilmeleri gibi farkl\u0131 ihtiya\u00e7lar\u0131 olabilmektedir. Bildi\u011fimiz gibi containerize olarak Kubernetes \u00fczerinde host etti\u011fimiz uygulamalar\u0131m\u0131z, do\u011fas\u0131 gere\u011fi ephemeral(k\u0131sa \u00f6m\u00fcrl\u00fc) ve stateless&#8216;d\u0131r. Yani persistent bir storage \u00e7\u00f6z\u00fcm\u00fc kullanmadan container i\u00e7erisinde depolayaca\u011f\u0131m\u0131z herhangi&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/gokhan-gokalp.com\/tr\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\/\">Devam\u0131n\u0131 okuyun<span class=\"screen-reader-text\">Azure Kubernetes Service \u00fczerinde Azure Files Kullanarak Persistent Volume&#8217;ler ile \u00c7al\u0131\u015fmak<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":3985,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,418,434],"tags":[626,625,440,628,629,623,624,622,627],"class_list":["post-3938","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-net","category-azure","category-containerizing","tag-azure-file-share","tag-azure-files","tag-kubernetes","tag-microsoft-defender","tag-microsoft-defender-for-storage","tag-persistentvolume","tag-persistentvolumeclaim","tag-storage","tag-volume-mount","entry"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"tr","enabled_languages":["en","tr"],"languages":{"en":{"title":true,"content":true,"excerpt":false},"tr":{"title":true,"content":true,"excerpt":false}}},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Azure Kubernetes Service \u00fczerinde Azure Files Kullanarak Persistent Volume&#039;ler ile \u00c7al\u0131\u015fmak - G\u00f6khan G\u00f6kalp<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gokhan-gokalp.com\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Azure Kubernetes Service \u00fczerinde Azure Files Kullanarak Persistent Volume&#039;ler ile \u00c7al\u0131\u015fmak - G\u00f6khan G\u00f6kalp\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gokhan-gokalp.com\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\/\" \/>\n<meta property=\"og:site_name\" content=\"G\u00f6khan G\u00f6kalp\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-06T20:18:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-07T09:13:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/persistent-volumes-aks-gokhan-gokalp.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"G\u00f6khan G\u00f6kalp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Yazan:\" \/>\n\t<meta name=\"twitter:data1\" content=\"G\u00f6khan G\u00f6kalp\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data2\" content=\"21 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\\\/\"},\"author\":{\"name\":\"G\u00f6khan G\u00f6kalp\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\"},\"headline\":\"Azure Kubernetes Service \u00fczerinde Azure Files Kullanarak Persistent Volume&#8217;ler ile \u00c7al\u0131\u015fmak\",\"datePublished\":\"2022-02-06T20:18:26+00:00\",\"dateModified\":\"2022-02-07T09:13:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\\\/\"},\"wordCount\":3622,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\"},\"image\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/persistent-volumes-aks-gokhan-gokalp.jpg\",\"keywords\":[\"azure file share\",\"azure files\",\"kubernetes\",\"microsoft defender\",\"microsoft defender for storage\",\"persistentvolume\",\"persistentvolumeclaim\",\"storage\",\"volume mount\"],\"articleSection\":[\".NET\",\"Azure\",\"Containerizing\"],\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/gokhan-gokalp.com\\\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\\\/\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\\\/\",\"name\":\"Azure Kubernetes Service \u00fczerinde Azure Files Kullanarak Persistent Volume'ler ile \u00c7al\u0131\u015fmak - G\u00f6khan G\u00f6kalp\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/persistent-volumes-aks-gokhan-gokalp.jpg\",\"datePublished\":\"2022-02-06T20:18:26+00:00\",\"dateModified\":\"2022-02-07T09:13:31+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\\\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gokhan-gokalp.com\\\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\\\/#primaryimage\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/persistent-volumes-aks-gokhan-gokalp.jpg\",\"contentUrl\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/persistent-volumes-aks-gokhan-gokalp.jpg\",\"width\":1200,\"height\":675},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gokhan-gokalp.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Working with Persistent Volumes by Using Azure Files in Azure Kubernetes Service\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#website\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/\",\"name\":\"G\u00f6khan G\u00f6kalp\",\"description\":\"C# &amp; Python lover\",\"publisher\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gokhan-gokalp.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"tr\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\",\"name\":\"G\u00f6khan G\u00f6kalp\",\"pronouns\":\"he\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659\",\"contentUrl\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659\",\"caption\":\"G\u00f6khan G\u00f6kalp\"},\"logo\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659\"},\"sameAs\":[\"https:\\\/\\\/gokhan-gokalp.com\"],\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/tr\\\/author\\\/gok-gokalp\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Azure Kubernetes Service \u00fczerinde Azure Files Kullanarak Persistent Volume'ler ile \u00c7al\u0131\u015fmak - G\u00f6khan G\u00f6kalp","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gokhan-gokalp.com\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\/","og_locale":"tr_TR","og_type":"article","og_title":"Azure Kubernetes Service \u00fczerinde Azure Files Kullanarak Persistent Volume'ler ile \u00c7al\u0131\u015fmak - G\u00f6khan G\u00f6kalp","og_url":"https:\/\/gokhan-gokalp.com\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\/","og_site_name":"G\u00f6khan G\u00f6kalp","article_published_time":"2022-02-06T20:18:26+00:00","article_modified_time":"2022-02-07T09:13:31+00:00","og_image":[{"width":1200,"height":675,"url":"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/persistent-volumes-aks-gokhan-gokalp.jpg","type":"image\/jpeg"}],"author":"G\u00f6khan G\u00f6kalp","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"G\u00f6khan G\u00f6kalp","Tahmini okuma s\u00fcresi":"21 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/gokhan-gokalp.com\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\/#article","isPartOf":{"@id":"https:\/\/gokhan-gokalp.com\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\/"},"author":{"name":"G\u00f6khan G\u00f6kalp","@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe"},"headline":"Azure Kubernetes Service \u00fczerinde Azure Files Kullanarak Persistent Volume&#8217;ler ile \u00c7al\u0131\u015fmak","datePublished":"2022-02-06T20:18:26+00:00","dateModified":"2022-02-07T09:13:31+00:00","mainEntityOfPage":{"@id":"https:\/\/gokhan-gokalp.com\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\/"},"wordCount":3622,"commentCount":3,"publisher":{"@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe"},"image":{"@id":"https:\/\/gokhan-gokalp.com\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\/#primaryimage"},"thumbnailUrl":"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/persistent-volumes-aks-gokhan-gokalp.jpg","keywords":["azure file share","azure files","kubernetes","microsoft defender","microsoft defender for storage","persistentvolume","persistentvolumeclaim","storage","volume mount"],"articleSection":[".NET","Azure","Containerizing"],"inLanguage":"tr","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/gokhan-gokalp.com\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/gokhan-gokalp.com\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\/","url":"https:\/\/gokhan-gokalp.com\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\/","name":"Azure Kubernetes Service \u00fczerinde Azure Files Kullanarak Persistent Volume'ler ile \u00c7al\u0131\u015fmak - G\u00f6khan G\u00f6kalp","isPartOf":{"@id":"https:\/\/gokhan-gokalp.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/gokhan-gokalp.com\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\/#primaryimage"},"image":{"@id":"https:\/\/gokhan-gokalp.com\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\/#primaryimage"},"thumbnailUrl":"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/persistent-volumes-aks-gokhan-gokalp.jpg","datePublished":"2022-02-06T20:18:26+00:00","dateModified":"2022-02-07T09:13:31+00:00","breadcrumb":{"@id":"https:\/\/gokhan-gokalp.com\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gokhan-gokalp.com\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\/"]}]},{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/gokhan-gokalp.com\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\/#primaryimage","url":"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/persistent-volumes-aks-gokhan-gokalp.jpg","contentUrl":"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/persistent-volumes-aks-gokhan-gokalp.jpg","width":1200,"height":675},{"@type":"BreadcrumbList","@id":"https:\/\/gokhan-gokalp.com\/working-with-persistent-volumes-by-using-azure-files-in-azure-kubernetes-service\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gokhan-gokalp.com\/"},{"@type":"ListItem","position":2,"name":"Working with Persistent Volumes by Using Azure Files in Azure Kubernetes Service"}]},{"@type":"WebSite","@id":"https:\/\/gokhan-gokalp.com\/#website","url":"https:\/\/gokhan-gokalp.com\/","name":"G\u00f6khan G\u00f6kalp","description":"C# &amp; Python lover","publisher":{"@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gokhan-gokalp.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"tr"},{"@type":["Person","Organization"],"@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe","name":"G\u00f6khan G\u00f6kalp","pronouns":"he","image":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659","url":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659","contentUrl":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659","caption":"G\u00f6khan G\u00f6kalp"},"logo":{"@id":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659"},"sameAs":["https:\/\/gokhan-gokalp.com"],"url":"https:\/\/gokhan-gokalp.com\/tr\/author\/gok-gokalp\/"}]}},"_links":{"self":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts\/3938","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/comments?post=3938"}],"version-history":[{"count":5,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts\/3938\/revisions"}],"predecessor-version":[{"id":3987,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts\/3938\/revisions\/3987"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/media\/3985"}],"wp:attachment":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/media?parent=3938"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/categories?post=3938"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/tags?post=3938"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}