我们在 swarm 环境中使用 docker。一切都很好......但是对于几天前出现的一个名为“exe”的奇怪进程:
14126 root 20 0 446836 33648 184 R 49.0 0.2 0:05.98 exe
1 root 20 0 52356 532 332 S 34.3 0.0 2750:22 systemd
13789 root 20 0 5424660 49784 0 S 5.6 0.3 2381:57 dockerd
Run Code Online (Sandbox Code Playgroud)
它确实占用了 100% 的 CPU。
我们试图了解它来自哪里,但它非常不稳定,它的 pid 每 3-4 秒就会改变一次。你可以猜想,这样的行为引发了一些警报。
最终,我们设置了一些监控工具(使用auditd)来拍摄它的快照,并看到:
Syscall event curl /usr/bin/curl 24242 24234
Syscall event 4 / 24240 24234
Syscall event exe /usr/bin/runc 24240 24234
Syscall event runc /usr/bin/runc 24234 10444
Run Code Online (Sandbox Code Playgroud)
“main”runc 的父进程是:
root 10444 2621 0 …Run Code Online (Sandbox Code Playgroud) 我有多个 Docker 映像和容器在 VM 上运行。但是像“runc list”这样的命令没有列出任何这些。
如何让 runc/containerd 知道我现有的 docker 镜像?
Kubernetes 取消了对 Docker 的支持,但支持 Containerd,这意味着什么?Docker 开发了containerd 并用它来管理容器。
有2个不同的containerd吗?
如果不是,那么为什么 kubernetes 无法与 Docker 守护进程使用的 containerd 进行通信/使用?
我以 .tar 格式导出了 docker 映像。
然后使用 K3S 和 ctr 导入这些图像没有显示任何结果:
$ sudo k3s ctr i import myimage.tar
$
Run Code Online (Sandbox Code Playgroud)
cmd没有输出import?
$ sudo k3s ctr i ls
$
Run Code Online (Sandbox Code Playgroud)
空空如也....
我无法执行到使用 containerd 作为运行时的容器。
我需要检查容器内运行的一些进程。有什么办法可以执行到容器中吗?
我可以使用 ctr cli 列出容器。
任何帮助,将不胜感激。
我一直在遵循Windows 上的 Gentle ContainerD 指南为您在我的 Windows 10 计算机上设置 ContainerD,但不知何故我无法从本教程中启动任何示例。
命令是: crictl.exe runp --runtime runhcs-wcow-process .\pod-config.yaml
错误是:
crictl.exe runp --runtime runhcs-wcow-process .\pod-config.yaml
time="2022-03-18T19:39:38+02:00" level=fatal msg="run pod sandbox:
rpc error: code = Unknown desc = failed to setup network for sandbox \"7db0b08199861ffc0a68b869990c2ce1e2cee29df2579f9502ec584fbd5d2913\": plugin type=\"nat\" name=\"natContainerD\" failed (add):
error creating endpoint hcnCreateEndpoint failed in Win32: IP address is either invalid or not part of any configured subnet(s). (0x803b001e) {\"Success\":false,\"Error\":\"IP address is either invalid or not part of any configured subnet(s). \",\"ErrorCode\":2151350302} …Run Code Online (Sandbox Code Playgroud) 我已经使用 containerd 在 CentOS 8 Kubernetes 1.17 上安装了 nignx ingress helm chat,ingress pod 失败并显示以下错误消息。同样的掌舵聊天在 CentOS 7 上与 Docker 一起工作。
I0116 04:17:06.624547 8 flags.go:205] Watching for Ingress class: nginx
W0116 04:17:06.624803 8 flags.go:250] SSL certificate chain completion is disabled (--enable-ssl-chain-completion=false)
W0116 04:17:06.624844 8 client_config.go:543] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
-------------------------------------------------------------------------------
NGINX Ingress controller
Release: 0.27.1
Build: git-1257ded99
Repository: https://github.com/kubernetes/ingress-nginx
nginx version: nginx/1.17.7
-------------------------------------------------------------------------------
I0116 04:17:06.624968 8 main.go:194] Creating API client for https://10.224.0.1:443
I0116 …Run Code Online (Sandbox Code Playgroud) 我创建了一个 microk8s 集群,可以通过命令列出 pod get pod:
ubuntu@ip-172-31-16-34:~$ microk8s.kubectl get pod --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-f7867546d-mlsbm 1/1 Running 1 98m
kube-system hostpath-provisioner-65cfd8595b-l2hjz 1/1 Running 1 98m
kube-system tiller-deploy-758bcdc94f-cwbjd 1/1 Running 0 93m
seldon-system seldon-controller-manager-54955d8675-72qxn 1/1 Running 0 33m
Run Code Online (Sandbox Code Playgroud)
但是,我尝试用 ctr 列出容器,但没有显示任何内容
ubuntu@ip-172-31-16-34:~$ microk8s.ctr c ls
CONTAINER IMAGE RUNTIME
Run Code Online (Sandbox Code Playgroud)
也尝试图像列表
$ microk8s.ctr image list
REF TYPE DIGEST SIZE PLATFORMS LABELS
Run Code Online (Sandbox Code Playgroud)
没什么:P 也许我需要找到它使用的命名空间?
我有一个使用 OpenFaaS 的应用程序。
特别是,我使用faasd,因为该函数将在处理能力较差的设备上运行。我有一个私人注册表,上面有一个“X”函数的图像。我想从 faasd 中提取此映像来部署并执行它,但我遇到了一个问题:当我尝试执行该操作时,我似乎没有经过身份验证,但我正确地传递了registryAuth令牌。
这里有一个我正在做的示例(遵循此https://ericstoekl.github.io/faas/operations/managing-images/#deploy-functions-with-private-registries-credentials)
邮政
<ip_address>:8080/system/functions
Run Code Online (Sandbox Code Playgroud)
标题:
{
"Authorization": "mytoken"
}
Run Code Online (Sandbox Code Playgroud)
身体:
{
"service": "functionName",
"image": "<registry_ip_address>/functions/functionName:<version>",
"envProcess": "/.../myprocess",
"registryAuth": <base64 token obtained from 'user:password'>,
"secrets": [
"mysecret"
]
}
Run Code Online (Sandbox Code Playgroud)
我确认参数全部正确,但收到此错误:
“无法拉取映像 <registry_ip_address>/functions/functionName:: 无法拉取:无法解析引用“<registry_ip_address>/functions/functionName:”:没有为令牌身份验证质询指定范围”
注册表运行良好,因为如果我尝试使用 docker 以经典方式下载映像,我就能够拉取映像。
先感谢您!
尝试在 Debian 10 (Buster) 上安装 Docker 时出现错误
The following packages have unmet dependencies:
docker-ce : Depends: containerd.io (>= 1.4.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud) 发生内部错误:在容器中执行命令时出错:无法在容器中执行:无法启动执行“0acebb686c1b464e7219419ce1e15439e28aaaa2ef84392f73ffb077a9cc3c8b”:OCI运行时执行失败:执行失败:container_linux.go:367:启动容器进程导致:执行:“cmd”:可执行文件在 $PATH 中找不到文件:未知
containerd ×11
docker ×5
kubernetes ×5
containers ×2
runc ×2
debian ×1
docker-ce ×1
docker-swarm ×1
faas ×1
k3s ×1
microk8s ×1
openfaas ×1
ps ×1
serverless ×1
windows ×1