After deployment, the pods, replicaset, and deployment are created successfully. However, when I try to delete the Deployment using kubectl delete deploy nginx-deployment
, the pods and replicaset are not deleted.
My deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 2 #
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
I have also tried kubectl delete deploy nginx-deployment --cascade=background
, but the issue persists. How should I proceed to ensure that the ReplicaSet and Pods are properly deleted when the Deployment is deleted?
Used software:
This issue was solved by updating the calico version. Seems that there is an incompatibility issue.