📲Namespaces
# Mevcut namespace'de çalışır.
kubectl get pods
# namespacecustom namespace 'i içerisinde bulunan podları getirir.
# -n argümanıda kullanılır.
# kubectl get pods --namespace namespacecustom
# app adında namespace oluşturmak.
kubectl create namespaces app
Namespace içerisinde bulunan objeler ile iletişim kurarken objenin namespace'ni
belirtmemiz gerekir.
# Farklı bir namespace'de bulunan containera bağlandık.
# kubectl exec --it namepod -n development -- /bin/bash
# Mevcut komut satırı namespace değiştirme. Bu komutdan sorna tüm komutlarımız
# development namespace içerisinde çalışacak.
kubectl config set-context --current --namespace:development
# namespace silmek
kubectl delete namespace developmentLast updated