Kubernetes top (kubectl top)命令显示了与在pod中运行的Linux命令不同的内存使用情况。我创建了k8s部署,其中YAML包含以下内存限制: limits: memory: 2500Mi cpu: 200mmemory: 2Gibash4.4$ kubectl top pod PODNAME
NAME
此脚本从用户输入和硬编码值组合一个命令,显示存储在变量中的命令,然后运行它:cpus="--cpu=host --vcpus=2"variant="--os-variant=debiantesting# Run the command based on the supplied variable values:
install_cm