SCALE runs Kubernetes so no need to invoke anything as Kubernetes will restore its state on bootup.
You can use the command line, but I would advise against it unless you truly know what you're trying to achieve as the middleware will most likely interfere if you didn't press the
stop button in the ui.
To stop/start/restart from the command line you can use commands such as the ones below. This is exactly what the UI does.
Code:
# stop or scale to zero
k3s kubectl -n <NAMESPACE> scale --replicas=0 deploy <DEPLOYMENT NAME>
# start or scale to 1
k3s kubectl -n <NAMESPACE> scale --replicas=1 deploy <DEPLOYMENT NAME>
# restart (no matter how many replicas)
k3s kubectl -n <NAMESPACE> rollout restart deploy <DEPLOYMENT NAME>
Use this command to list deployments in specific namespaces:
Code:
k3s kubectl -n <NAMESPACE> get deploy
Please note that there can be differences in these commands as you do have the options with some apps to run multiple replicas or auto scale depending on load - this will not work properly out of the box because it needs metrics and k3s by default comes with metrics-server disabled (easy fix but it will revert on SCALE upgrades).