kubeadm: Force to disable debug mode for crictl

Signed-off-by: Dave Chen <dave.chen@arm.com>
This commit is contained in:
Dave Chen 2022-06-30 14:50:32 +08:00
parent 7f920da442
commit c5b22b535b

View File

@ -84,7 +84,10 @@ func (runtime *CRIRuntime) IsRunning() error {
// ListKubeContainers lists running k8s CRI pods
func (runtime *CRIRuntime) ListKubeContainers() ([]string, error) {
out, err := runtime.crictl("pods", "-q").CombinedOutput()
// Disable debug mode regardless how the crictl is configured so that the debug info won't be
// iterpreted to the Pod ID.
args := []string{"-D=false", "pods", "-q"}
out, err := runtime.crictl(args...).CombinedOutput()
if err != nil {
return nil, errors.Wrapf(err, "output: %s, error", string(out))
}