crit icon indicating copy to clipboard operation
crit copied to clipboard

Add `crit down` command/functionality

Open ChrisRx opened this issue 5 years ago • 0 comments

Just as the crit up command is used to bootstrap a new node, the crit down sub-command should be added that stops and cleans up that node. This mostly involves using the cri-api to list and stop all containers running on the node, and stopping the kubelet service. The protobuf file specifying the runtime service can be seen here and usage of the cri-api within crit can be demonstrated here:

  • https://github.com/criticalstack/crit/blob/master/pkg/kubernetes/remote/remote.go
  • https://github.com/criticalstack/crit/blob/d9fce2457f8cc5fabfea72f19e05eb5406b7bc85/pkg/cluster/init.go#L73-L98

I do not believe any files should be removed as part of crit down (not that I can think of currently), but a good litmus test for functionality should be that a user can run crit up again after running crit down and it will bootstrap a new node just as it did initially.

ChrisRx avatar Oct 06 '20 14:10 ChrisRx