Score:1

kind cluster is not deleting, how to fix that?

ke flag

I am trying to delete kind cluster using.

kind delete cluster --name samples

And I got error after waiting for 15 min.

Deleting cluster "samples" ...
ERROR: failed to delete cluster "samples": failed to delete nodes: command "docker rm -f -v samples-control-plane" failed with error: exit status 1
Command Output: Error response from daemon: removal of container samples-control-plane is already in progress

But this is the only command I ran to delete, not before.

So tried to delete the container of kind cluster using.

docker ps

CONTAINER ID   IMAGE                  COMMAND                  CREATED          STATUS          PORTS
  NAMES
5d0fa7222662   postgres:latest        "docker-entrypoint.s…"   51 minutes ago   Up 51 minutes   0.0.0.0:5432->5432/tcp, :::5432->5432/tcp   postgres_database
e6acb3781680   kindest/node:v1.21.1   "/usr/local/bin/entr…"   33 hours ago     Up 2 hours      127.0.0.1:44151->6443/tcp
  samples-control-plane

And tried deleting stopping it first.

docker stop e6

But stuck there for almost an hour but no response till now.

So I pressed ctrl+c and ran the command with -t.

docker stop e6 -t 2

Same result, stuck there and kept for 3 hours and more, but still there only. How to delete this?

Score:1
id flag

The problem you described most likely has to do with the docker bug. There are many threads on github related to this situation:

that looks like a docker bug, there was at least one previous bug like this where containers would get in a partially removed state and the only fix was manually removing them w/o docker. looking for current issues upstream.

Potentally fiexed in this topic.

Hm, I don't think this is a docker-compose issue. However, the way I would proceed is

  1. Stop the docker daemon (sudo service docker stop)
  2. Remove the remaining container files sudo rm -rf /var/lib/docker/containers/9adaaacc30d3<TAB>
  3. Start the docker daemon (sudo service docker start).

Solution / workaround:

Try to restart the docker daemon and do a docker system prune -a.

Score:0
in flag

my environment:
windows 10 + wsl2 + ubuntu 20
the following worked for me

kind delete clusters CLUSTERNAME
DimiDak avatar
ph flag
This worked also on linux even if it's not in the official documentation of kind. The suggested `kind delete cluster --name <clustername>` from the documentation did not delete the docker containers. This one did.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.