{"id":36596,"date":"2025-12-20T11:40:49","date_gmt":"2025-12-20T08:40:49","guid":{"rendered":"https:\/\/fatihsoysal.com\/blog\/?p=36596"},"modified":"2025-12-20T11:40:49","modified_gmt":"2025-12-20T08:40:49","slug":"kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi","status":"publish","type":"post","link":"https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/","title":{"rendered":"Kubernetes ile PHP Uygulamas\u0131n\u0131 Ubuntu 16.04 \u00dczerinde Da\u011f\u0131tma Rehberi"},"content":{"rendered":"<p><body><\/p>\n<h2>Kubernetes ile PHP Uygulamas\u0131n\u0131 Ubuntu 16.04 \u00dczerinde Da\u011f\u0131tma Rehberi<\/h2>\n<h2>Giri\u015f<\/h2>\n<p>Modern yaz\u0131l\u0131m geli\u015ftirme d\u00fcnyas\u0131nda, uygulamalar\u0131n da\u011f\u0131t\u0131m\u0131, y\u00f6netimi ve \u00f6l\u00e7eklenmesi giderek karma\u015f\u0131k hale gelmektedir. Mikroservis mimarileri, bulut tabanl\u0131 \u00e7\u00f6z\u00fcmler ve s\u00fcrekli entegrasyon\/s\u00fcrekli da\u011f\u0131t\u0131m (CI\/CD) yakla\u015f\u0131mlar\u0131, bu karma\u015f\u0131kl\u0131\u011f\u0131 y\u00f6netmek i\u00e7in g\u00fc\u00e7l\u00fc ara\u00e7lara olan ihtiyac\u0131 art\u0131rm\u0131\u015ft\u0131r. \u0130\u015fte tam bu noktada Kubernetes devreye girer. Kubernetes, konteynerli i\u015f y\u00fcklerini ve hizmetlerini otomatikle\u015ftirmek i\u00e7in a\u00e7\u0131k kaynakl\u0131 bir platformdur. Google taraf\u0131ndan geli\u015ftirilen ve \u015fu anda Cloud Native Computing Foundation (CNCF) taraf\u0131ndan s\u00fcrd\u00fcr\u00fclen Kubernetes, konteyner orkestrasyonunda end\u00fcstri standard\u0131 haline gelmi\u015ftir.<\/p>\n<p>PHP, web geli\u015ftirme i\u00e7in en pop\u00fcler dillerden biridir ve milyonlarca web sitesine g\u00fc\u00e7 vermektedir. Geleneksel olarak PHP uygulamalar\u0131, Apache veya Nginx gibi bir web sunucusu ve PHP-FPM ile bir LAMP\/LEMP y\u0131\u011f\u0131n\u0131 \u00fczerinde \u00e7al\u0131\u015ft\u0131r\u0131l\u0131r. Ancak, konteyner teknolojileri (\u00f6zellikle Docker) ve Kubernetes&#8217;in y\u00fckseli\u015fiyle birlikte, PHP uygulamalar\u0131n\u0131 daha esnek, \u00f6l\u00e7eklenebilir ve ta\u015f\u0131nabilir bir \u015fekilde da\u011f\u0131tmak m\u00fcmk\u00fcn hale gelmi\u015ftir.<\/p>\n<p>Bu makalede, Ubuntu 16.04 i\u015fletim sistemi \u00fczerinde bir Kubernetes k\u00fcmesi kurmay\u0131 ve basit bir PHP uygulamas\u0131n\u0131 bu k\u00fcme \u00fczerinde da\u011f\u0131tmay\u0131 ad\u0131m ad\u0131m ele alaca\u011f\u0131z. Ubuntu 16.04, g\u00fcncel bir s\u00fcr\u00fcm olmasa da, bir\u00e7ok eski sistemde hala kullan\u0131lmaktad\u0131r ve Kubernetes&#8217;in bu t\u00fcr ortamlarda nas\u0131l \u00e7al\u0131\u015ft\u0131\u011f\u0131n\u0131 g\u00f6stermek a\u00e7\u0131s\u0131ndan de\u011ferli bir \u00f6rnek te\u015fkil edecektir. Amac\u0131m\u0131z, okuyuculara hem Kubernetes&#8217;in temel kurulumunu hem de PHP uygulamalar\u0131n\u0131 konteynerle\u015ftirip Kubernetes&#8217;e da\u011f\u0131tma s\u00fcrecini pratik bir \u015fekilde \u00f6\u011fretmektir. Bu rehber, temel Linux bilgisine, Docker ve Kubernetes kavramlar\u0131na a\u015fina olan geli\u015ftiriciler ve sistem y\u00f6neticileri i\u00e7in tasarlanm\u0131\u015ft\u0131r.<\/p>\n<h2>\u00d6n Gereksinimler<\/h2>\n<p>Bu rehbere ba\u015flamadan \u00f6nce a\u015fa\u011f\u0131daki \u00f6n gereksinimleri kar\u015f\u0131lad\u0131\u011f\u0131n\u0131zdan emin olun:<\/p>\n<h3>Donan\u0131m ve \u0130\u015fletim Sistemi<\/h3>\n<ul>\n<li>En az iki adet Ubuntu 16.04 sunucusu (bir Master Node, bir veya daha fazla Worker Node). Her sunucu i\u00e7in en az 2 CPU veya vCPU ve 2GB RAM \u00f6nerilir.<\/li>\n<li>Sunucular aras\u0131nda a\u011f ba\u011flant\u0131s\u0131.<\/li>\n<li>Her sunucuda root ayr\u0131cal\u0131klar\u0131na sahip bir kullan\u0131c\u0131 veya <code>sudo<\/code> yetkisine sahip bir kullan\u0131c\u0131.<\/li>\n<\/ul>\n<h3>Yaz\u0131l\u0131m ve Temel Bilgiler<\/h3>\n<ul>\n<li>Her sunucuda Docker&#8217;\u0131n kurulu ve \u00e7al\u0131\u015f\u0131r durumda olmas\u0131.<\/li>\n<li><code>kubeadm<\/code>, <code>kubelet<\/code> ve <code>kubectl<\/code> ara\u00e7lar\u0131n\u0131n kurulmas\u0131 gerekecektir (bu makalede ad\u0131m ad\u0131m anlat\u0131lacakt\u0131r).<\/li>\n<li>Kubernetes&#8217;in temel kavramlar\u0131 hakk\u0131nda bilgi (Pod, Deployment, Service, Namespace vb.).<\/li>\n<li>Temel Linux komut sat\u0131r\u0131 bilgisi.<\/li>\n<li>Konteynerle\u015ftirme (Docker) hakk\u0131nda temel bilgi.<\/li>\n<\/ul>\n<h3>A\u011f Gereksinimleri<\/h3>\n<p>Kubernetes k\u00fcmesinin d\u00fczg\u00fcn \u00e7al\u0131\u015fabilmesi i\u00e7in baz\u0131 portlar\u0131n a\u00e7\u0131k olmas\u0131 gerekmektedir. G\u00fcvenlik duvar\u0131n\u0131zda (ufw veya ba\u015fka bir firewall) a\u015fa\u011f\u0131daki portlar\u0131n a\u00e7\u0131k oldu\u011fundan emin olun:<\/p>\n<h4>Master Node i\u00e7in:<\/h4>\n<ul>\n<li>TCP 6443 (Kubernetes API sunucusu)<\/li>\n<li>TCP 2379-2380 (etcd sunucusu)<\/li>\n<li>TCP 10250 (Kubelet API)<\/li>\n<li>TCP 10251 (kube-scheduler)<\/li>\n<li>TCP 10252 (kube-controller-manager)<\/li>\n<\/ul>\n<h4>Worker Node&#8217;lar i\u00e7in:<\/h4>\n<ul>\n<li>TCP 10250 (Kubelet API)<\/li>\n<li>TCP 30000-32767 (NodePort hizmetleri i\u00e7in varsay\u0131lan aral\u0131k)<\/li>\n<\/ul>\n<p>Ayr\u0131ca, k\u00fcme i\u00e7i ileti\u015fimin sa\u011flanabilmesi i\u00e7in t\u00fcm sunucular aras\u0131nda t\u00fcm portlarda (veya \u00f6zel olarak CNI eklentinizin gerektirdi\u011fi portlarda) ileti\u015fim izni verilmelidir.<\/p>\n<h2>Kubernetes K\u00fcmesi Kurulumu (Ubuntu 16.04 \u00dczerinde)<\/h2>\n<p>Bu b\u00f6l\u00fcmde, Ubuntu 16.04 sunucular\u0131 \u00fczerinde bir Kubernetes k\u00fcmesini ad\u0131m ad\u0131m kuraca\u011f\u0131z.<\/p>\n<h3>3.1. Sunucu Haz\u0131rl\u0131\u011f\u0131<\/h3>\n<p>T\u00fcm master ve worker node&#8217;larda a\u015fa\u011f\u0131daki ad\u0131mlar\u0131 uygulay\u0131n.<\/p>\n<h4>Swap&#8217;\u0131 Kapatma:<\/h4>\n<p>Kubernetes, performans ve kararl\u0131l\u0131k nedenleriyle swap&#8217;\u0131n kapal\u0131 olmas\u0131n\u0131 gerektirir.<\/p>\n<pre><code class=\"language-bash\">sudo swapoff -a\nsudo sed -i '\/ swap \/ s\/^\\(.*\\)$\/#\\1\/g' \/etc\/fstab<\/code><\/pre>\n<h4>Hostname Ayarlar\u0131:<\/h4>\n<p>Her sunucuya benzersiz bir hostname atay\u0131n ve <code>\/etc\/hosts<\/code> dosyas\u0131n\u0131 g\u00fcncelleyin.<br \/>\nMaster Node i\u00e7in:<\/p>\n<pre><code class=\"language-bash\">sudo hostnamectl set-hostname master-node\necho \"192.168.1.100 master-node\" | sudo tee -a \/etc\/hosts # Master IP adresinizi girin<\/code><\/pre>\n<p>Worker Node i\u00e7in (her worker i\u00e7in ayr\u0131 hostname ve IP):<\/p>\n<pre><code class=\"language-bash\">sudo hostnamectl set-hostname worker-node-1\necho \"192.168.1.101 worker-node-1\" | sudo tee -a \/etc\/hosts # Worker IP adresinizi girin<\/code><\/pre>\n<p>Di\u011fer t\u00fcm sunucular\u0131n IP ve hostname bilgilerini her sunucunun <code>\/etc\/hosts<\/code> dosyas\u0131na eklemek iyi bir uygulamad\u0131r.<\/p>\n<h4><code>br_netfilter<\/code> Mod\u00fcl\u00fcn\u00fc Etkinle\u015ftirme:<\/h4>\n<p>Kubernetes a\u011f eklentilerinin d\u00fczg\u00fcn \u00e7al\u0131\u015fmas\u0131 i\u00e7in <code>br_netfilter<\/code> mod\u00fcl\u00fcn\u00fcn y\u00fcklenmesi ve <code>iptables<\/code> ayarlar\u0131n\u0131n yap\u0131lmas\u0131 gerekir.<\/p>\n<pre><code class=\"language-bash\">sudo modprobe br_netfilter\necho '1' | sudo tee \/proc\/sys\/net\/bridge\/bridge-nf-call-iptables\necho '1' | sudo tee \/proc\/sys\/net\/bridge\/bridge-nf-call-ip6tables<\/code><\/pre>\n<p>Bu ayarlar\u0131n kal\u0131c\u0131 olmas\u0131 i\u00e7in <code>\/etc\/sysctl.conf<\/code> dosyas\u0131na ekleyin:<\/p>\n<pre><code class=\"language-bash\">echo \"net.bridge.bridge-nf-call-iptables = 1\" | sudo tee -a \/etc\/sysctl.conf\necho \"net.bridge.bridge-nf-call-ip6tables = 1\" | sudo tee -a \/etc\/sysctl.conf\nsudo sysctl -p<\/code><\/pre>\n<h3>3.2. Docker Kurulumu<\/h3>\n<p>Ubuntu 16.04 i\u00e7in Docker kurulumu biraz farkl\u0131l\u0131k g\u00f6sterebilir.<\/p>\n<pre><code class=\"language-bash\">sudo apt update\nsudo apt install -y apt-transport-https ca-certificates curl software-properties-common\ncurl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo apt-key add -\nsudo add-apt-repository \"deb [arch=amd64] https:\/\/download.docker.com\/linux\/ubuntu xenial stable\"\nsudo apt update\nsudo apt install -y docker-ce=18.06.3~ce~3-0~ubuntu # Kubernetes ile uyumlu eski bir Docker s\u00fcr\u00fcm\u00fc belirtmek \u00f6nemlidir.\nsudo systemctl enable docker\nsudo systemctl start docker<\/code><\/pre>\n<h3>3.3. Kubeadm, Kubelet, Kubectl Kurulumu<\/h3>\n<p>Kubernetes bile\u015fenlerini kurmak i\u00e7in Kubernetes deposunu eklememiz gerekiyor.<\/p>\n<pre><code class=\"language-bash\">sudo apt update\nsudo apt install -y apt-transport-https curl\ncurl -s https:\/\/packages.cloud.google.com\/apt\/doc\/apt-key.gpg | sudo apt-key add -\necho \"deb http:\/\/apt.kubernetes.io\/ kubernetes-xenial main\" | sudo tee \/etc\/apt\/sources.list.d\/kubernetes.list\nsudo apt update\nsudo apt install -y kubelet=1.15.12-00 kubeadm=1.15.12-00 kubectl=1.15.12-00 # Ubuntu 16.04 i\u00e7in uyumlu eski bir s\u00fcr\u00fcm\nsudo apt-mark hold kubelet kubeadm kubectl<\/code><\/pre>\n<p>Burada <code>1.15.12-00<\/code> s\u00fcr\u00fcm\u00fc, Ubuntu 16.04 ve Docker 18.06.3 ile uyumlu oldu\u011fu bilinen nispeten eski bir Kubernetes s\u00fcr\u00fcm\u00fcd\u00fcr. G\u00fcncel s\u00fcr\u00fcmler eski i\u015fletim sistemleriyle uyumsuzluk g\u00f6sterebilir.<\/p>\n<h3>3.4. Master Node Kurulumu<\/h3>\n<p>Sadece Master Node \u00fczerinde a\u015fa\u011f\u0131daki komutu \u00e7al\u0131\u015ft\u0131r\u0131n.<\/p>\n<pre><code class=\"language-bash\">sudo kubeadm init --pod-network-cidr=192.168.0.0\/16 --kubernetes-version=v1.15.12<\/code><\/pre>\n<p><code>--pod-network-cidr<\/code> parametresi, kullanaca\u011f\u0131m\u0131z a\u011f eklentisinin (bu \u00f6rnekte Calico) pod&#8217;lara atayaca\u011f\u0131 IP aral\u0131\u011f\u0131n\u0131 belirtir. <code>kubernetes-version<\/code> ise kurulumunu yapt\u0131\u011f\u0131m\u0131z s\u00fcr\u00fcmle e\u015fle\u015fmelidir.<\/p>\n<p>Kurulum tamamland\u0131\u011f\u0131nda, <code>kubeadm<\/code> size <code>kubectl<\/code>&#8216;i yap\u0131land\u0131rmak i\u00e7in komutlar ve worker node&#8217;lar\u0131 k\u00fcmeye katmak i\u00e7in bir <code>kubeadm join<\/code> komutu verecektir. Bu \u00e7\u0131kt\u0131y\u0131 saklay\u0131n.<\/p>\n<p><code>kubectl<\/code>&#8216;i yap\u0131land\u0131rmak i\u00e7in:<\/p>\n<pre><code class=\"language-bash\">mkdir -p $HOME\/.kube\nsudo cp -i \/etc\/kubernetes\/admin.conf $HOME\/.kube\/config\nsudo chown $(id -u):$(id -g) $HOME\/.kube\/config<\/code><\/pre>\n<p>\u015eimdi bir a\u011f eklentisi (CNI) kurmal\u0131y\u0131z. Bu \u00f6rnekte Calico kullanaca\u011f\u0131z.<\/p>\n<pre><code class=\"language-bash\">kubectl apply -f https:\/\/docs.projectcalico.org\/v3.8\/manifests\/calico.yaml<\/code><\/pre>\n<p>Calico&#8217;nun kurulumu biraz zaman alabilir. Durumu kontrol etmek i\u00e7in:<\/p>\n<pre><code class=\"language-bash\">kubectl get pods --all-namespaces<\/code><\/pre>\n<p>T\u00fcm pod&#8217;lar <code>Running<\/code> durumuna geldi\u011finde, master node haz\u0131r demektir.<\/p>\n<h3>3.5. Worker Node&#8217;lar\u0131 K\u00fcme Katma<\/h3>\n<p>Master Node kurulumu tamamland\u0131\u011f\u0131nda elde etti\u011finiz <code>kubeadm join<\/code> komutunu her bir Worker Node \u00fczerinde \u00e7al\u0131\u015ft\u0131r\u0131n. \u00d6rne\u011fin:<\/p>\n<pre><code class=\"language-bash\">sudo kubeadm join 192.168.1.100:6443 --token <token> --discovery-token-ca-cert-hash sha256:<hash><\/code><\/pre>\n<p><code><token><\/code> ve <code><hash><\/code> de\u011ferlerini kendi \u00e7\u0131kt\u0131n\u0131zdaki de\u011ferlerle de\u011fi\u015ftirin.<br \/>\nT\u00fcm worker node&#8217;lar kat\u0131ld\u0131ktan sonra, Master Node \u00fczerinden k\u00fcme durumunu kontrol edebilirsiniz:<\/p>\n<pre><code class=\"language-bash\">kubectl get nodes<\/code><\/pre>\n<p>T\u00fcm node&#8217;lar\u0131n <code>Ready<\/code> durumunda olmas\u0131 gerekmektedir.<\/p>\n<h2>PHP Uygulamas\u0131 \u0130\u00e7in Docker \u0130maj\u0131 Olu\u015fturma<\/h2>\n<p>Kubernetes&#8217;e da\u011f\u0131tmadan \u00f6nce PHP uygulamam\u0131z\u0131 bir Docker imaj\u0131na d\u00f6n\u00fc\u015ft\u00fcrmemiz gerekiyor.<\/p>\n<h3>4.1. Basit Bir PHP Uygulamas\u0131<\/h3>\n<p>\u00d6rnek olarak, basit bir <code>index.php<\/code> dosyas\u0131 olu\u015ftural\u0131m:<\/p>\n<pre><code class=\"language-php\"><?php\necho \"\";\necho \"<p>Bu uygulama bir Kubernetes k\u00fcmesi \u00fczerinde \u00e7al\u0131\u015f\u0131yor.<\/p>\";\necho \"<p>PHP versiyonu: \" . phpversion() . \"<\/p>\";\n?><\/code><\/pre>\n<p>Bu dosyay\u0131 <code>app<\/code> ad\u0131nda bir dizine kaydedin.<\/p>\n<h3>4.2. Dockerfile Olu\u015fturma<\/h3>\n<p>Uygulamam\u0131z\u0131 \u00e7al\u0131\u015ft\u0131rmak i\u00e7in Nginx ve PHP-FPM i\u00e7eren bir Dockerfile olu\u015ftural\u0131m. Bu, tek bir imajda hem web sunucusunu hem de PHP yorumlay\u0131c\u0131s\u0131n\u0131 bar\u0131nd\u0131ran basit bir yakla\u015f\u0131md\u0131r. Daha karma\u015f\u0131k senaryolarda Nginx ve PHP-FPM ayr\u0131 konteynerlerde \u00e7al\u0131\u015ft\u0131r\u0131labilir.<\/p>\n<p><code>app<\/code> dizininin k\u00f6k\u00fcnde bir <code>Dockerfile<\/code> olu\u015fturun:<\/p>\n<pre><code class=\"language-dockerfile\"># Nginx ve PHP-FPM i\u00e7eren bir taban imaj\u0131 kullan\u0131yoruz\nFROM richarvey\/nginx-php-fpm:latest\n\n<h2>Uygulama dosyalar\u0131m\u0131z\u0131 konteyner i\u00e7ine kopyala<\/h2>\nCOPY . \/var\/www\/html\/\n\n<h2>Nginx yap\u0131land\u0131rmas\u0131n\u0131 g\u00fcncelleyelim (iste\u011fe ba\u011fl\u0131, varsay\u0131lan \u00e7o\u011fu zaman yeterlidir)<\/h2>\n<h2>Kendi Nginx yap\u0131land\u0131rma dosyan\u0131z\u0131 kopyalayabilirsiniz.<\/h2>\n<h2>COPY nginx.conf \/etc\/nginx\/sites-available\/default.conf<\/h2>\n\n<h2>Gerekli PHP uzant\u0131lar\u0131n\u0131 y\u00fckleyebiliriz (\u00f6rne\u011fin MySQL deste\u011fi i\u00e7in)<\/h2>\n<h2>RUN docker-php-ext-install pdo_mysql<\/h2>\n\n<h2>Composer kullan\u0131yorsan\u0131z<\/h2>\n<h2>COPY --from=composer:latest \/usr\/bin\/composer \/usr\/bin\/composer<\/h2>\n<h2>RUN composer install --no-dev --optimize-autoloader<\/h2>\n\n<h2>Nginx ve PHP-FPM varsay\u0131lan olarak ba\u015flat\u0131l\u0131r, ek bir CMD'ye gerek yok.<\/h2>\n<h2>Varsay\u0131lan port 80'dir.<\/h2>\nEXPOSE 80<\/code><\/pre>\n<p>Bu Dockerfile, <code>richarvey\/nginx-php-fpm<\/code> imaj\u0131n\u0131 temel al\u0131r. Bu imaj, Nginx ve PHP-FPM&#8217;i tek bir konteynerde \u00e7al\u0131\u015ft\u0131racak \u015fekilde \u00f6nceden yap\u0131land\u0131r\u0131lm\u0131\u015ft\u0131r. Uygulama dosyalar\u0131n\u0131z\u0131 <code>\/var\/www\/html\/<\/code> dizinine kopyalar.<\/p>\n<h3>4.3. Docker \u0130maj\u0131n\u0131 Olu\u015fturma ve Yay\u0131mlama<\/h3>\n<p><code>Dockerfile<\/code> ve <code>index.php<\/code> dosyan\u0131z\u0131n bulundu\u011fu <code>app<\/code> dizininde a\u015fa\u011f\u0131daki komutu \u00e7al\u0131\u015ft\u0131rarak Docker imaj\u0131n\u0131 olu\u015fturun:<\/p>\n<pre><code class=\"language-bash\">docker build -t your-dockerhub-username\/php-app:v1.0 .<\/code><\/pre>\n<p><code>your-dockerhub-username<\/code> yerine kendi Docker Hub kullan\u0131c\u0131 ad\u0131n\u0131z\u0131 yaz\u0131n.<\/p>\n<p>\u0130maj\u0131 olu\u015fturduktan sonra, Kubernetes k\u00fcmenizin bu imaja eri\u015febilmesi i\u00e7in bir konteyner kay\u0131t defterine (\u00f6rne\u011fin Docker Hub) yay\u0131mlaman\u0131z gerekir.<br \/>\n\u00d6nce Docker Hub&#8217;a giri\u015f yap\u0131n:<\/p>\n<pre><code class=\"language-bash\">docker login<\/code><\/pre>\n<p>Ard\u0131ndan imaj\u0131 yay\u0131mlay\u0131n:<\/p>\n<pre><code class=\"language-bash\">docker push your-dockerhub-username\/php-app:v1.0<\/code><\/pre>\n<p>E\u011fer \u00f6zel bir kay\u0131t defteri kullan\u0131yorsan\u0131z, <code>docker push<\/code> komutunu uygun \u015fekilde ayarlaman\u0131z gerekir.<\/p>\n<h2>Kubernetes&#8217;e PHP Uygulamas\u0131n\u0131 Da\u011f\u0131tma<\/h2>\n<p>Art\u0131k Docker imaj\u0131m\u0131z haz\u0131r oldu\u011funa g\u00f6re, PHP uygulamam\u0131z\u0131 Kubernetes k\u00fcmemize da\u011f\u0131tabiliriz.<\/p>\n<h3>5.1. Kubernetes Manifest Dosyalar\u0131<\/h3>\n<p>Kubernetes&#8217;te uygulamalar\u0131 da\u011f\u0131tmak i\u00e7in YAML format\u0131nda manifest dosyalar\u0131 kullan\u0131r\u0131z. Bu dosyalar, k\u00fcmenin istedi\u011fimiz durumu tan\u0131mlar.<\/p>\n<h4>5.1.1. Namespace Olu\u015fturma<\/h4>\n<p>Uygulamalar\u0131m\u0131z\u0131 di\u011fer uygulamalardan izole etmek i\u00e7in bir namespace olu\u015ftural\u0131m.<br \/>\n<code>php-app-namespace.yaml<\/code>:<\/p>\n<pre><code class=\"language-yaml\">apiVersion: v1\nkind: Namespace\nmetadata:\n  name: php-app-dev<\/code><\/pre>\n<p>Uygulay\u0131n:<\/p>\n<pre><code class=\"language-bash\">kubectl apply -f php-app-namespace.yaml<\/code><\/pre>\n<h4>5.1.2. Deployment Olu\u015fturma<\/h4>\n<p>Deployment, uygulamam\u0131z\u0131n Pod&#8217;lar\u0131n\u0131 y\u00f6netmekten sorumludur. Ka\u00e7 replika olaca\u011f\u0131n\u0131, hangi Docker imaj\u0131n\u0131n kullan\u0131laca\u011f\u0131n\u0131 ve hangi portlar\u0131n a\u00e7\u0131laca\u011f\u0131n\u0131 tan\u0131mlar.<br \/>\n<code>php-app-deployment.yaml<\/code>:<\/p>\n<pre><code class=\"language-yaml\">apiVersion: apps\/v1\nkind: Deployment\nmetadata:\n  name: php-app-deployment\n  namespace: php-app-dev\n  labels:\n    app: php-app\nspec:\n  replicas: 3 # Uygulaman\u0131zdan 3 adet Pod \u00e7al\u0131\u015ft\u0131r\n  selector:\n    matchLabels:\n      app: php-app\n  template:\n    metadata:\n      labels:\n        app: php-app\n    spec:\n      containers:\n      - name: php-app-container\n        image: your-dockerhub-username\/php-app:v1.0 # Kendi Docker imaj\u0131n\u0131z\u0131n ad\u0131n\u0131 ve etiketini girin\n        ports:\n        - containerPort: 80 # Uygulaman\u0131n dinledi\u011fi port\n        resources:\n          requests:\n            memory: \"64Mi\"\n            cpu: \"250m\"\n          limits:\n            memory: \"128Mi\"\n            cpu: \"500m\"\n        # Ortam de\u011fi\u015fkenleri veya ConfigMap\/Secret kullan\u0131m\u0131 burada yap\u0131labilir\n        # env:\n        #   - name: DB_HOST\n        #     value: \"mysql-service\"<\/code><\/pre>\n<p>Bu deployment, <code>php-app<\/code> etiketine sahip 3 adet pod olu\u015fturur. Her pod, bizim olu\u015fturdu\u011fumuz <code>php-app:v1.0<\/code> imaj\u0131n\u0131 kullan\u0131r ve 80 numaral\u0131 portu a\u00e7ar. <code>resources<\/code> k\u0131sm\u0131, pod&#8217;lar\u0131n ne kadar CPU ve bellek kullanabilece\u011fini s\u0131n\u0131rlar.<\/p>\n<h4>5.1.3. Service Olu\u015fturma<\/h4>\n<p>Service, Pod&#8217;lar\u0131m\u0131za d\u0131\u015far\u0131dan eri\u015fim sa\u011flamak veya k\u00fcme i\u00e7indeki di\u011fer Pod&#8217;lar\u0131n bu uygulamaya eri\u015fmesini sa\u011flamak i\u00e7in kullan\u0131l\u0131r. <code>NodePort<\/code> tipi, uygulamay\u0131 her bir worker node&#8217;un belirli bir portu \u00fczerinden d\u0131\u015far\u0131ya a\u00e7ar.<br \/>\n<code>php-app-service.yaml<\/code>:<\/p>\n<pre><code class=\"language-yaml\">apiVersion: v1\nkind: Service\nmetadata:\n  name: php-app-service\n  namespace: php-app-dev\nspec:\n  selector:\n    app: php-app # Bu service, 'app: php-app' etiketine sahip Pod'lar\u0131 hedefleyecek\n  ports:\n    - protocol: TCP\n      port: 80 # Service'in dinleyece\u011fi port (k\u00fcme i\u00e7inde)\n      targetPort: 80 # Pod'un dinledi\u011fi port\n      nodePort: 30080 # D\u0131\u015far\u0131dan eri\u015fim i\u00e7in Node'un a\u00e7aca\u011f\u0131 port (30000-32767 aral\u0131\u011f\u0131nda)\n  type: NodePort # D\u0131\u015far\u0131dan eri\u015fim i\u00e7in NodePort kullan\u0131yoruz<\/code><\/pre>\n<p>Bu servis, <code>php-app<\/code> etiketine sahip pod&#8217;lara y\u00f6nlendirme yapar. K\u00fcme i\u00e7inde 80 numaral\u0131 porttan eri\u015filebilirken, d\u0131\u015far\u0131dan herhangi bir worker node&#8217;un <code>30080<\/code> numaral\u0131 portu \u00fczerinden eri\u015filebilir olacakt\u0131r.<\/p>\n<h4>5.1.4. (Opsiyonel) Persistent Volume ve Persistent Volume Claim<\/h4>\n<p>PHP uygulamalar\u0131 genellikle dosya y\u00fcklemeleri veya veritaban\u0131 gibi kal\u0131c\u0131 depolama gerektirebilir. Konteynerler ge\u00e7icidir, bu y\u00fczden kal\u0131c\u0131 veriler i\u00e7in Persistent Volume (PV) ve Persistent Volume Claim (PVC) kullan\u0131r\u0131z. Bu \u00f6rnekte basitlik ad\u0131na bir <code>hostPath<\/code> PV tan\u0131mlayabiliriz, ancak \u00fcretim ortamlar\u0131nda NFS, Ceph, AWS EBS, Azure Disk gibi \u00e7\u00f6z\u00fcmler tercih edilir.<\/p>\n<p><code>php-app-pv.yaml<\/code>:<\/p>\n<pre><code class=\"language-yaml\">apiVersion: v1\nkind: PersistentVolume\nmetadata:\n  name: php-app-pv\nspec:\n  capacity:\n    storage: 1Gi\n  accessModes:\n    - ReadWriteOnce\n  hostPath: # Sadece test ve geli\u015ftirme i\u00e7in uygundur. \u00dcretim i\u00e7in daha sa\u011flam \u00e7\u00f6z\u00fcmler kullan\u0131n.\n    path: \"\/mnt\/data\/php-app\" # Worker Node'da bu dizin olu\u015fturulmal\u0131<\/code><\/pre>\n<p><code>php-app-pvc.yaml<\/code>:<\/p>\n<pre><code class=\"language-yaml\">apiVersion: v1\nkind: PersistentVolumeClaim\nmetadata:\n  name: php-app-pvc\n  namespace: php-app-dev\nspec:\n  accessModes:\n    - ReadWriteOnce\n  resources:\n    requests:\n      storage: 500Mi<\/code><\/pre>\n<p>Deployment&#8217;\u0131n\u0131za PVC&#8217;yi ba\u011flamak i\u00e7in:<\/p>\n<pre><code class=\"language-yaml\"># ... deployment.yaml i\u00e7inde\n        volumeMounts:\n        - name: php-app-storage\n          mountPath: \/var\/www\/html\/uploads # Uygulaman\u0131z\u0131n kal\u0131c\u0131 depolama ihtiyac\u0131 olan dizin\n      volumes:\n      - name: php-app-storage\n        persistentVolumeClaim:\n          claimName: php-app-pvc<\/code><\/pre>\n<p>Bu ad\u0131mlar\u0131 uygulamadan \u00f6nce, her worker node&#8217;da <code>\/mnt\/data\/php-app<\/code> dizinini olu\u015fturdu\u011funuzdan emin olun: <code>sudo mkdir -p \/mnt\/data\/php-app && sudo chmod 777 \/mnt\/data\/php-app<\/code>.<\/p>\n<h4>5.1.5. (Opsiyonel) ConfigMap ve Secret<\/h4>\n<p>Uygulama yap\u0131land\u0131rma dosyalar\u0131 veya hassas bilgiler (veritaban\u0131 \u015fifreleri) i\u00e7in ConfigMap ve Secret kullanmak en iyi y\u00f6ntemdir.<br \/>\n<code>php-app-configmap.yaml<\/code>:<\/p>\n<pre><code class=\"language-yaml\">apiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: php-app-config\n  namespace: php-app-dev\ndata:\n  APP_ENV: production\n  DEBUG_MODE: \"false\"<\/code><\/pre>\n<p><code>php-app-secret.yaml<\/code>:<\/p>\n<pre><code class=\"language-yaml\">apiVersion: v1\nkind: Secret\nmetadata:\n  name: php-app-secret\n  namespace: php-app-dev\ntype: Opaque\ndata:\n  DB_PASSWORD: <base64_encoded_password> # echo -n \"your_password\" | base64<\/code><\/pre>\n<p>Deployment&#8217;\u0131n\u0131zda bunlar\u0131 kullanmak i\u00e7in:<\/p>\n<pre><code class=\"language-yaml\"># ... deployment.yaml i\u00e7inde\n        env:\n        - name: APP_ENV\n          valueFrom:\n            configMapKeyRef:\n              name: php-app-config\n              key: APP_ENV\n        - name: DB_PASSWORD\n          valueFrom:\n            secretKeyRef:\n              name: php-app-secret\n              key: DB_PASSWORD<\/code><\/pre>\n<h3>5.2. Uygulamay\u0131 Da\u011f\u0131tma<\/h3>\n<p>T\u00fcm manifest dosyalar\u0131n\u0131z\u0131 (en az\u0131ndan namespace, deployment ve service) ayn\u0131 dizine koyun ve a\u015fa\u011f\u0131daki komutu \u00e7al\u0131\u015ft\u0131r\u0131n:<\/p>\n<pre><code class=\"language-bash\">kubectl apply -f . # Bulundu\u011funuz dizindeki t\u00fcm YAML dosyalar\u0131n\u0131 uygular<\/code><\/pre>\n<h3>5.3. Da\u011f\u0131t\u0131m\u0131 Do\u011frulama<\/h3>\n<p>Uygulaman\u0131z\u0131n ba\u015far\u0131yla da\u011f\u0131t\u0131l\u0131p da\u011f\u0131t\u0131lmad\u0131\u011f\u0131n\u0131 kontrol edelim:<br \/>\nPod&#8217;lar\u0131 kontrol edin:<\/p>\n<pre><code class=\"language-bash\">kubectl get pods -n php-app-dev<\/code><\/pre>\n<p>T\u00fcm pod&#8217;lar\u0131n <code>Running<\/code> durumunda olmas\u0131 gerekir.<\/p>\n<p>Deployment&#8217;\u0131 kontrol edin:<\/p>\n<pre><code class=\"language-bash\">kubectl get deployments -n php-app-dev<\/code><\/pre>\n<p>Servisleri kontrol edin:<\/p>\n<pre><code class=\"language-bash\">kubectl get services -n php-app-dev<\/code><\/pre>\n<p>Burada <code>php-app-service<\/code> i\u00e7in <code>NodePort<\/code> de\u011ferini g\u00f6receksiniz (\u00f6rne\u011fin 30080).<\/p>\n<p>\u015eimdi uygulaman\u0131za eri\u015fmek i\u00e7in herhangi bir Worker Node&#8217;un IP adresini ve NodePort&#8217;u kullan\u0131n. \u00d6rne\u011fin: <code>http:\/\/<worker-node-ip>:30080<\/code><br \/>\nTaray\u0131c\u0131n\u0131zda &#8220;Merhaba Kubernetes!&#8221; mesaj\u0131n\u0131 g\u00f6rmeniz gerekir.<\/p>\n<h2>Uygulama Y\u00f6netimi ve \u00d6l\u00e7ekleme<\/h2>\n<p>Kubernetes, da\u011f\u0131t\u0131lan uygulamalar\u0131n y\u00f6netimini ve \u00f6l\u00e7eklenmesini kolayla\u015ft\u0131r\u0131r.<\/p>\n<h3>6.1. \u00d6l\u00e7ekleme<\/h3>\n<p>Uygulaman\u0131z\u0131n trafik y\u00fck\u00fc artt\u0131\u011f\u0131nda, daha fazla pod \u00e7al\u0131\u015ft\u0131rarak \u00f6l\u00e7ekleyebilirsiniz:<\/p>\n<pre><code class=\"language-bash\">kubectl scale deployment php-app-deployment --replicas=5 -n php-app-dev<\/code><\/pre>\n<p>Bu komut, <code>php-app-deployment<\/code> adl\u0131 da\u011f\u0131t\u0131m\u0131n pod say\u0131s\u0131n\u0131 3&#8217;ten 5&#8217;e \u00e7\u0131karacakt\u0131r. Kubernetes, otomatik olarak yeni pod&#8217;lar\u0131 ba\u015flatacak ve trafi\u011fi onlara y\u00f6nlendirecektir.<\/p>\n<p>Otomatik \u00f6l\u00e7ekleme i\u00e7in Horizontal Pod Autoscaler (HPA) kullanabilirsiniz. HPA, CPU veya bellek kullan\u0131m\u0131 gibi metrikleri izleyerek pod say\u0131s\u0131n\u0131 otomatik olarak ayarlar.<\/p>\n<h3>6.2. G\u00fcncelleme (Rolling Updates)<\/h3>\n<p>Uygulaman\u0131z\u0131n yeni bir s\u00fcr\u00fcm\u00fcn\u00fc da\u011f\u0131tmak istedi\u011finizde, Docker imaj\u0131n\u0131z\u0131n etiketini g\u00fcncelleyip deployment manifestini tekrar uygulaman\u0131z yeterlidir.<br \/>\n\u00d6rne\u011fin, <code>php-app:v2.0<\/code> ad\u0131nda yeni bir imaj\u0131n\u0131z varsa, <code>php-app-deployment.yaml<\/code> dosyas\u0131n\u0131 d\u00fczenleyin:<\/p>\n<pre><code class=\"language-yaml\"># ...\n        image: your-dockerhub-username\/php-app:v2.0 # v1.0 yerine v2.0\n<h2>...<\/code><\/pre>\n<\/h2>\n<p>Ard\u0131ndan manifesti tekrar uygulay\u0131n:<\/p>\n<pre><code class=\"language-bash\">kubectl apply -f php-app-deployment.yaml<\/code><\/pre>\n<p>Kubernetes, kesintisiz bir g\u00fcncelleme sa\u011flamak i\u00e7in rolling update stratejisini kullan\u0131r. Eski pod&#8217;lar\u0131 yava\u015f\u00e7a sonland\u0131r\u0131rken yeni pod&#8217;lar\u0131 ba\u015flat\u0131r, b\u00f6ylece uygulama her zaman eri\u015filebilir kal\u0131r.<\/p>\n<h3>6.3. Loglama ve \u0130zleme<\/h3>\n<p>Bir pod&#8217;un loglar\u0131n\u0131 g\u00f6rmek i\u00e7in:<\/p>\n<pre><code class=\"language-bash\">kubectl logs <pod-ad\u0131> -n php-app-dev<\/code><\/pre>\n<p>Pod&#8217;lar genelinde loglar\u0131 toplamak ve analiz etmek i\u00e7in ELK Stack (Elasticsearch, Logstash, Kibana) veya Grafana Loki gibi \u00e7\u00f6z\u00fcmler kullan\u0131labilir.<\/p>\n<p>K\u00fcme kaynaklar\u0131n\u0131 izlemek i\u00e7in Prometheus ve Grafana pop\u00fcler \u00e7\u00f6z\u00fcmlerdir. <code>kube-state-metrics<\/code> ve <code>node-exporter<\/code> gibi bile\u015fenlerle entegre edilerek detayl\u0131 metrikler toplanabilir.<\/p>\n<h2>S\u0131k Kar\u015f\u0131la\u015f\u0131lan Sorunlar ve \u00c7\u00f6z\u00fcmleri<\/h2>\n<p>Kubernetes ile \u00e7al\u0131\u015f\u0131rken kar\u015f\u0131la\u015fabilece\u011finiz baz\u0131 yayg\u0131n sorunlar ve \u00e7\u00f6z\u00fcmleri:<\/p>\n<ul>\n<li>\n        <strong>Pod&#8217;lar <code>Pending<\/code> durumunda kal\u0131yor:<\/strong><\/p>\n<ul>\n<li>Yeterli kaynak (CPU\/RAM) yok mu? <code>kubectl describe pod <pod-ad\u0131> -n <namespace><\/code> komutuyla olaylar\u0131 kontrol edin.<\/li>\n<li>Persistent Volume Claim (PVC) ba\u011flanam\u0131yor mu? PV\/PVC durumunu kontrol edin.<\/li>\n<li>Node&#8217;lar <code>Ready<\/code> durumunda m\u0131? <code>kubectl get nodes<\/code> ile kontrol edin.<\/li>\n<\/ul>\n<\/li>\n<li>\n        <strong>Pod&#8217;lar <code>CrashLoopBackOff<\/code> durumunda:<\/strong><\/p>\n<ul>\n<li>Uygulama konteyneri i\u00e7inde bir hata var. <code>kubectl logs <pod-ad\u0131> -n <namespace><\/code> ile loglar\u0131 kontrol edin.<\/li>\n<li>Docker imaj\u0131 bozuk olabilir veya ba\u011f\u0131ml\u0131l\u0131klar\u0131 eksik olabilir.<\/li>\n<li>Ortam de\u011fi\u015fkenleri veya yap\u0131land\u0131rma yanl\u0131\u015f olabilir.<\/li>\n<\/ul>\n<\/li>\n<li>\n        <strong>Servis eri\u015filemiyor:<\/strong><\/p>\n<ul>\n<li><code>kubectl get services -n <namespace><\/code> ile servis durumunu kontrol edin.<\/li>\n<li><code>selector<\/code> etiketleri deployment&#8217;taki pod etiketleriyle e\u015fle\u015fiyor mu?<\/li>\n<li>G\u00fcvenlik duvar\u0131 kurallar\u0131 NodePort&#8217;u engelliyor olabilir.<\/li>\n<li><code>kubectl describe service <service-ad\u0131> -n <namespace><\/code> ile olaylar\u0131 kontrol edin.<\/li>\n<\/ul>\n<\/li>\n<li>\n        <strong><code>ImagePullBackOff<\/code> hatas\u0131:<\/strong><\/p>\n<ul>\n<li>Docker imaj ad\u0131 veya etiketi yanl\u0131\u015f olabilir.<\/li>\n<li>Kay\u0131t defteri (Docker Hub) eri\u015filebilir de\u011fil veya kimlik do\u011frulama hatas\u0131 var.<\/li>\n<li><code>docker login<\/code> ile kimlik do\u011frulamas\u0131n\u0131 kontrol edin ve Kubernetes Secret olarak <code>imagePullSecrets<\/code> kullanmay\u0131 d\u00fc\u015f\u00fcn\u00fcn.<\/li>\n<\/ul>\n<\/li>\n<li>\n        <strong>DNS sorunlar\u0131 (Pod&#8217;lar aras\u0131 ileti\u015fimde):<\/strong><\/p>\n<ul>\n<li><code>coredns<\/code> pod&#8217;lar\u0131n\u0131n <code>Running<\/code> durumunda oldu\u011fundan emin olun (<code>kubectl get pods -n kube-system<\/code>).<\/li>\n<li>Pod&#8217;un i\u00e7inde <code>nslookup <service-ad\u0131>.<namespace>.svc.cluster.local<\/code> komutuyla DNS \u00e7\u00f6z\u00fcmlemesini test edin.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Sonu\u00e7<\/h2>\n<p>Bu makalede, Ubuntu 16.04 \u00fczerinde bir Kubernetes k\u00fcmesi kurma s\u00fcrecini ve basit bir PHP uygulamas\u0131n\u0131 bu k\u00fcme \u00fczerinde da\u011f\u0131tmay\u0131 ad\u0131m ad\u0131m inceledik. Konteynerle\u015ftirme, Docker imaj\u0131 olu\u015fturma, Kubernetes manifest dosyalar\u0131 (Deployment, Service, Namespace) yazma ve uygulamay\u0131 da\u011f\u0131tma ad\u0131mlar\u0131n\u0131 ba\u015far\u0131yla tamamlad\u0131k. Ayr\u0131ca, uygulamay\u0131 \u00f6l\u00e7ekleme, g\u00fcncelleme ve s\u0131k kar\u015f\u0131la\u015f\u0131lan sorunlara y\u00f6nelik \u00e7\u00f6z\u00fcmlere de de\u011findik.<\/p>\n<p>Kubernetes, PHP uygulamalar\u0131na modern bir da\u011f\u0131t\u0131m ve y\u00f6netim yetene\u011fi kazand\u0131rarak onlar\u0131 daha esnek, \u00f6l\u00e7eklenebilir ve dayan\u0131kl\u0131 hale getirir. Geleneksel LAMP\/LEMP y\u0131\u011f\u0131nlar\u0131na k\u0131yasla, Kubernetes ile PHP uygulamalar\u0131 daha dinamik bir altyap\u0131da \u00e7al\u0131\u015fabilir, kaynaklar\u0131 daha verimli kullanabilir ve geli\u015ftirme s\u00fcre\u00e7lerini h\u0131zland\u0131rabilir.<\/p>\n<p>Bu rehber, Kubernetes yolculu\u011funuz i\u00e7in sa\u011flam bir ba\u015flang\u0131\u00e7 noktas\u0131 sunmaktad\u0131r. Daha ileri ad\u0131mlar olarak, CI\/CD boru hatlar\u0131n\u0131 Kubernetes ile entegre etmek, Ingress Controller kullanarak d\u0131\u015far\u0131dan daha geli\u015fmi\u015f trafik y\u00f6nlendirme sa\u011flamak, Helm gibi paket y\u00f6neticileriyle uygulama da\u011f\u0131t\u0131m\u0131n\u0131 otomatikle\u015ftirmek ve daha karma\u015f\u0131k \u00e7ok katmanl\u0131 PHP uygulamalar\u0131n\u0131 (veritabanlar\u0131, kuyruk sistemleri ile birlikte) da\u011f\u0131tmak gibi konular\u0131 ara\u015ft\u0131rabilirsiniz. Kubernetes&#8217;in sundu\u011fu olanaklar s\u0131n\u0131rs\u0131zd\u0131r ve \u00f6\u011frenmeye devam ettik\u00e7e uygulamalar\u0131n\u0131z i\u00e7in daha g\u00fc\u00e7l\u00fc ve verimli \u00e7\u00f6z\u00fcmler geli\u015ftirebilirsiniz.<\/body><\/p>\n","protected":false},"excerpt":{"rendered":"Kubernetes ile PHP Uygulamas\u0131n\u0131 Ubuntu 16.04 \u00dczerinde Da\u011f\u0131tma Rehberi\nGiri\u015f\nModern yaz\u0131l\u0131m geli\u015ftirme d\u00fcnyas\u0131nda, uygulamalar\u0131n da\u011f\u0131t\u0131","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_page_header_type":"","csco_page_load_nextpost":"","csco_page_subscribe_form":"","csco_page_contact_form":"","footnotes":""},"categories":[1468],"tags":[],"class_list":{"0":"post-36596","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-ubuntu","7":"cs-entry","8":"cs-video-wrap"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.5 (Yoast SEO v25.3.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Kubernetes ile PHP Uygulamas\u0131n\u0131 Ubuntu 16.04 \u00dczerinde Da\u011f\u0131tma Rehberi - Kodlar\u0131n Gizemli D\u00fcnyas\u0131<\/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:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Kubernetes ile PHP Uygulamas\u0131n\u0131 Ubuntu 16.04 \u00dczerinde Da\u011f\u0131tma Rehberi\" \/>\n<meta property=\"og:description\" content=\"Kubernetes ile PHP Uygulamas\u0131n\u0131 Ubuntu 16.04 \u00dczerinde Da\u011f\u0131tma Rehberi Giri\u015f Modern yaz\u0131l\u0131m geli\u015ftirme d\u00fcnyas\u0131nda, uygulamalar\u0131n da\u011f\u0131t\u0131\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/\" \/>\n<meta property=\"og:site_name\" content=\"Kodlar\u0131n Gizemli D\u00fcnyas\u0131\" \/>\n<meta property=\"article:published_time\" content=\"2025-12-20T08:40:49+00:00\" \/>\n<meta name=\"author\" content=\"Fatih Soysal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Yazan:\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fatih Soysal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data2\" content=\"16 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/\"},\"author\":{\"name\":\"Fatih Soysal\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"headline\":\"Kubernetes ile PHP Uygulamas\u0131n\u0131 Ubuntu 16.04 \u00dczerinde Da\u011f\u0131tma Rehberi\",\"datePublished\":\"2025-12-20T08:40:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/\"},\"wordCount\":2257,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"articleSection\":[\"Ubuntu\"],\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/#respond\"]}],\"copyrightYear\":\"2025\",\"copyrightHolder\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/\",\"name\":\"Kubernetes ile PHP Uygulamas\u0131n\u0131 Ubuntu 16.04 \u00dczerinde Da\u011f\u0131tma Rehberi - Kodlar\u0131n Gizemli D\u00fcnyas\u0131\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\"},\"datePublished\":\"2025-12-20T08:40:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Anasayfa\",\"item\":\"https:\/\/fatihsoysal.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Kubernetes ile PHP Uygulamas\u0131n\u0131 Ubuntu 16.04 \u00dczerinde Da\u011f\u0131tma Rehberi\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/\",\"name\":\"Fatihsoysal.com\",\"description\":\"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim\",\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"tr\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\",\"name\":\"Fatih Soysal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"contentUrl\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"width\":512,\"height\":512,\"caption\":\"Fatih Soysal\"},\"logo\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Kubernetes ile PHP Uygulamas\u0131n\u0131 Ubuntu 16.04 \u00dczerinde Da\u011f\u0131tma Rehberi - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","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:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/","og_locale":"tr_TR","og_type":"article","og_title":"Kubernetes ile PHP Uygulamas\u0131n\u0131 Ubuntu 16.04 \u00dczerinde Da\u011f\u0131tma Rehberi","og_description":"Kubernetes ile PHP Uygulamas\u0131n\u0131 Ubuntu 16.04 \u00dczerinde Da\u011f\u0131tma Rehberi Giri\u015f Modern yaz\u0131l\u0131m geli\u015ftirme d\u00fcnyas\u0131nda, uygulamalar\u0131n da\u011f\u0131t\u0131","og_url":"https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/","og_site_name":"Kodlar\u0131n Gizemli D\u00fcnyas\u0131","article_published_time":"2025-12-20T08:40:49+00:00","author":"Fatih Soysal","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"Fatih Soysal","Tahmini okuma s\u00fcresi":"16 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/#article","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/"},"author":{"name":"Fatih Soysal","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"headline":"Kubernetes ile PHP Uygulamas\u0131n\u0131 Ubuntu 16.04 \u00dczerinde Da\u011f\u0131tma Rehberi","datePublished":"2025-12-20T08:40:49+00:00","mainEntityOfPage":{"@id":"https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/"},"wordCount":2257,"commentCount":0,"publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"articleSection":["Ubuntu"],"inLanguage":"tr","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/#respond"]}],"copyrightYear":"2025","copyrightHolder":{"@id":"https:\/\/fatihsoysal.com\/blog\/#organization"}},{"@type":"WebPage","@id":"https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/","url":"https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/","name":"Kubernetes ile PHP Uygulamas\u0131n\u0131 Ubuntu 16.04 \u00dczerinde Da\u011f\u0131tma Rehberi - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/#website"},"datePublished":"2025-12-20T08:40:49+00:00","breadcrumb":{"@id":"https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/fatihsoysal.com\/blog\/kubernetes-ile-php-uygulamasini-ubuntu-16-04-uzerinde-dagitma-rehberi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Anasayfa","item":"https:\/\/fatihsoysal.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Kubernetes ile PHP Uygulamas\u0131n\u0131 Ubuntu 16.04 \u00dczerinde Da\u011f\u0131tma Rehberi"}]},{"@type":"WebSite","@id":"https:\/\/fatihsoysal.com\/blog\/#website","url":"https:\/\/fatihsoysal.com\/blog\/","name":"Fatihsoysal.com","description":"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim","publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"tr"},{"@type":["Person","Organization"],"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1","name":"Fatih Soysal","image":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","contentUrl":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","width":512,"height":512,"caption":"Fatih Soysal"},"logo":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/"},"description":"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.","url":"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/"}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/36596","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/comments?post=36596"}],"version-history":[{"count":1,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/36596\/revisions"}],"predecessor-version":[{"id":36597,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/36596\/revisions\/36597"}],"wp:attachment":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/media?parent=36596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/categories?post=36596"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/tags?post=36596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}