{"id":268,"date":"2026-06-19T12:00:00","date_gmt":"2026-06-19T12:00:00","guid":{"rendered":"https:\/\/konteynerium.com\/?p=210"},"modified":"2026-10-06T11:34:00","modified_gmt":"2026-10-06T11:34:00","slug":"kubernetes-temelleri-pod-deployment-service-nedir","status":"publish","type":"post","link":"https:\/\/konteynerium.com\/index.php\/2026\/06\/19\/kubernetes-temelleri-pod-deployment-service-nedir\/","title":{"rendered":"Kubernetes Temelleri: Pod, Deployment ve Service Nedir?"},"content":{"rendered":"<p>Kubernetes (k\u0131saca <strong>K8s<\/strong>), Google&#8217;\u0131n kendi i\u00e7 altyap\u0131s\u0131nda y\u0131llarca kulland\u0131\u011f\u0131 sistemden esinlenerek geli\u015ftirdi\u011fi, bug\u00fcn container orkestrasyonunda fiili standart haline gelmi\u015f a\u00e7\u0131k kaynak bir platformdur. \u0130lk bak\u0131\u015fta terminolojisi g\u00f6z korkutucu gelebilir, ama temelde yapt\u0131\u011f\u0131 \u015fey Docker Swarm ile ayn\u0131d\u0131r: &#8220;bu uygulaman\u0131n \u015fu kadar kopyas\u0131 her zaman ayakta olsun&#8221; dedi\u011finiz bir <em>istenen durumu<\/em> s\u00fcrekli sa\u011flamaya \u00e7al\u0131\u015f\u0131r. Fark, bunu \u00e7ok daha esnek ve geni\u015fletilebilir bir \u015fekilde yapmas\u0131d\u0131r.<\/p>\n<h2>K\u00fcme mimarisi: Control Plane ve Node&#8217;lar<\/h2>\n<p>Bir Kubernetes k\u00fcmesi iki ana par\u00e7adan olu\u015fur:<\/p>\n<ul>\n<li><strong>Control Plane:<\/strong> K\u00fcmenin &#8220;beyni&#8221;. API sunucusu, zamanlay\u0131c\u0131 (scheduler) ve k\u00fcme durumunu tutan veritaban\u0131 (etcd) buradad\u0131r. Siz k\u00fcmeye komut verdi\u011finizde asl\u0131nda Control Plane&#8217;deki API sunucusuyla konu\u015fursunuz.<\/li>\n<li><strong>Worker node&#8217;lar:<\/strong> As\u0131l uygulamalar\u0131n\u0131z\u0131n (Pod&#8217;lar\u0131n) \u00e7al\u0131\u015ft\u0131\u011f\u0131 sunuculard\u0131r. Her node \u00fczerinde <code>kubelet<\/code> adl\u0131 bir ajan \u00e7al\u0131\u015f\u0131r ve Control Plane&#8217;in talimatlar\u0131n\u0131 uygular.<\/li>\n<\/ul>\n<h2>Pod: Kubernetes&#8217;in en k\u00fc\u00e7\u00fck yap\u0131 ta\u015f\u0131<\/h2>\n<p>Docker&#8217;da do\u011frudan container \u00e7al\u0131\u015ft\u0131r\u0131rs\u0131n\u0131z; Kubernetes&#8217;te en k\u00fc\u00e7\u00fck da\u011f\u0131t\u0131m birimi container de\u011fil, <strong>Pod<\/strong>&#8216;dur. Bir Pod, genellikle tek bir container&#8217;\u0131 sarmalar, ama bazen a\u011f ve depolamay\u0131 payla\u015fan birden fazla s\u0131k\u0131 ba\u011fl\u0131 container&#8217;\u0131 bir arada bar\u0131nd\u0131rabilir (\u00f6rne\u011fin ana uygulama + log toplay\u0131c\u0131 yan container&#8217;\u0131).<\/p>\n<pre><code># En basit haliyle bir Pod tan\u0131m\u0131 (pod.yaml)\napiVersion: v1\nkind: Pod\nmetadata:\n  name: merhaba-web\nspec:\n  containers:\n    - name: web\n      image: nginx:1.27\n      ports:\n        - containerPort: 80<\/code><\/pre>\n<pre><code>kubectl apply -f pod.yaml\nkubectl get pods<\/code><\/pre>\n<h2>Deployment: Pod&#8217;lar\u0131 y\u00f6netmenin do\u011fru yolu<\/h2>\n<p>Pod&#8217;lar\u0131 do\u011frudan elle olu\u015fturmak pratikte pek yap\u0131lmaz, \u00e7\u00fcnk\u00fc bir Pod \u00e7\u00f6kerse kendi kendine yeniden ba\u015flamaz. Bunun yerine bir <strong>Deployment<\/strong> tan\u0131mlars\u0131n\u0131z \u2014 Deployment, &#8220;bu Pod \u015fablonundan her zaman N kopya \u00e7al\u0131\u015fs\u0131n&#8221; der ve eksik kalan kopyalar\u0131 otomatik olarak yeniden olu\u015fturur:<\/p>\n<pre><code># deployment.yaml\napiVersion: apps\/v1\nkind: Deployment\nmetadata:\n  name: web-deployment\nspec:\n  replicas: 3\n  selector:\n    matchLabels:\n      app: web\n  template:\n    metadata:\n      labels:\n        app: web\n    spec:\n      containers:\n        - name: web\n          image: nginx:1.27\n          ports:\n            - containerPort: 80<\/code><\/pre>\n<pre><code>kubectl apply -f deployment.yaml\nkubectl scale deployment\/web-deployment --replicas=6\nkubectl set image deployment\/web-deployment web=nginx:1.28<\/code><\/pre>\n<h2>Service: Pod&#8217;lara sabit bir adres kazand\u0131rmak<\/h2>\n<p>Pod&#8217;lar tek ba\u015f\u0131na karars\u0131zd\u0131r \u2014 bir Pod yeniden olu\u015fturuldu\u011funda yeni bir IP adresi al\u0131r. Bu y\u00fczden di\u011fer uygulamalar\u0131n (veya d\u0131\u015f d\u00fcnyan\u0131n) do\u011frudan Pod IP&#8217;sine g\u00fcvenmesi i\u015fe yaramaz. <strong>Service<\/strong>, belirli etiketlere (<code>label<\/code>) sahip Pod grubuna sabit, de\u011fi\u015fmeyen tek bir adres ve isim \u00fczerinden eri\u015fim sa\u011flar; trafi\u011fi o an ayakta olan Pod&#8217;lar aras\u0131nda otomatik olarak dengeler:<\/p>\n<pre><code># service.yaml\napiVersion: v1\nkind: Service\nmetadata:\n  name: web-service\nspec:\n  selector:\n    app: web\n  ports:\n    - port: 80\n      targetPort: 80\n  type: ClusterIP<\/code><\/pre>\n<div class=\"callout\">\n  <span class=\"glyph\">\u2713<\/span><\/p>\n<p>Pod \u2192 Deployment \u2192 Service \u00fc\u00e7l\u00fcs\u00fc Kubernetes&#8217;in en temel deseni: Deployment Pod&#8217;lar\u0131n hayatta kalmas\u0131n\u0131 garanti eder, Service ise bu Pod&#8217;lara sabit bir &#8220;kap\u0131&#8221; sa\u011flar. D\u0131\u015f d\u00fcnyadan eri\u015fim i\u00e7in genellikle bir de <code>Ingress<\/code> kayna\u011f\u0131 eklenir.<\/p>\n<\/div>\n<h2>Docker Compose&#8217;dan gelen biri i\u00e7in h\u0131zl\u0131 \u00e7eviri tablosu<\/h2>\n<table>\n<thead>\n<tr>\n<th>Docker Compose<\/th>\n<th>Kubernetes kar\u015f\u0131l\u0131\u011f\u0131<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>docker-compose.yml<\/code><\/td>\n<td>Birden fazla YAML manifesti (Deployment, Service, &#8230;)<\/td>\n<\/tr>\n<tr>\n<td><code>services:<\/code> alt\u0131ndaki bir servis<\/td>\n<td>Deployment + Service ikilisi<\/td>\n<\/tr>\n<tr>\n<td><code>docker compose up<\/code><\/td>\n<td><code>kubectl apply -f .<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>replicas<\/code> (Compose&#8217;da s\u0131n\u0131rl\u0131)<\/td>\n<td><code>spec.replicas<\/code> (tam otomatik \u00f6l\u00e7ekleme ile)<\/td>\n<\/tr>\n<tr>\n<td><code>ports:<\/code><\/td>\n<td><code>Service<\/code> + iste\u011fe ba\u011fl\u0131 <code>Ingress<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Bu temel \u00fc\u00e7l\u00fcy\u00fc (Pod, Deployment, Service) anlad\u0131ktan sonra Kubernetes&#8217;in geri kalan\u0131 \u2014 ConfigMap, Secret, Ingress, StatefulSet gibi kaynaklar \u2014 bu temel \u00fczerine katman katman eklenir. Bu portaldaki <a href=\"https:\/\/konteynerium.com\/index.php\/proje-mimarisi-olusturucu\/\">Mimari Olu\u015fturucu<\/a> arac\u0131yla, bu kaynaklar\u0131n ger\u00e7ek bir manifestte nas\u0131l bir araya geldi\u011fini g\u00f6rsel olarak inceleyebilirsiniz.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kubernetes&#8217;in en temel \u00fc\u00e7 kavram\u0131n\u0131 \u2014 Pod, Deployment ve Service \u2014 s\u0131f\u0131rdan, ger\u00e7ek YAML \u00f6rnekleriyle ve Docker Compose&#8217;tan gelenler i\u00e7in bir \u00e7eviri tablosuyla anlat\u0131yoruz.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"seviye":[8],"class_list":["post-268","post","type-post","status-publish","format-standard","hentry","category-orkestrasyon-guvenlik","seviye-orta"],"_links":{"self":[{"href":"https:\/\/konteynerium.com\/index.php\/wp-json\/wp\/v2\/posts\/268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/konteynerium.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/konteynerium.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/konteynerium.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/konteynerium.com\/index.php\/wp-json\/wp\/v2\/comments?post=268"}],"version-history":[{"count":2,"href":"https:\/\/konteynerium.com\/index.php\/wp-json\/wp\/v2\/posts\/268\/revisions"}],"predecessor-version":[{"id":569,"href":"https:\/\/konteynerium.com\/index.php\/wp-json\/wp\/v2\/posts\/268\/revisions\/569"}],"wp:attachment":[{"href":"https:\/\/konteynerium.com\/index.php\/wp-json\/wp\/v2\/media?parent=268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/konteynerium.com\/index.php\/wp-json\/wp\/v2\/categories?post=268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/konteynerium.com\/index.php\/wp-json\/wp\/v2\/tags?post=268"},{"taxonomy":"seviye","embeddable":true,"href":"https:\/\/konteynerium.com\/index.php\/wp-json\/wp\/v2\/seviye?post=268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}