Cluster information:
Kubernetes version: 1.27.2
Cloud being used: baremetal
Installation method: kubeadm
Host OS: Ubuntu 20.04.4 LTS
CNI and version: calico v3.26.0
CRI and version: containerd v1.6.2
Dummy NGINX Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: stacksimplify/kube-nginxapp1:1.0.0
ports:
- containerPort: 80
Output after deploying
NAME READY STATUS RESTARTS AGE
pod/nginx-deployment-7d94b5f487-7q2hd 1/1 Running 0 8s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/nginx-deployment 1/1 1 1 8s
NAME DESIRED CURRENT READY AGE
replicaset.apps/nginx-deployment-7d94b5f487 1 1 1 8s
After i run kubectl delete deploy nginx-deployment
NAME READY STATUS RESTARTS AGE
pod/nginx-deployment-7d94b5f487-7q2hd 1/1 Running 0 5m22s
NAME DESIRED CURRENT READY AGE
replicaset.apps/nginx-deployment-7d94b5f487 1 1 1 5m23s
Even if i run kubectl delete deploy nginx-deployment --cascade=background
, the replicasets and pods does not get deleted.
How should I proceed with this?
Thank you!