繁体   English   中英

如何在 EKS 中配置私有注册表 (1.24 kube.netes)

[英]How to configure private registries in EKS (1.24 kubernetes)

我们一直在尝试在我们的模板中为 eks 上的托管节点组输入此用户数据,但 containerd-config.toml 文件始终是 eks 的默认设置,eks 是否会覆盖我们所做的或文件是否未被编辑?

我们已经设置了一个 txt 来显示任何错误,但该文件也没有保存在节点上。 知道发生了什么吗?

#!/bin/bash
echo '[plugins."io.containerd.grpc.v1.cri".registry.configs."PRIVATE-REGISTRY".tls]
      insecure_skip_verify = true
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."PRIVATE-REGISTRY"]
      endpoint = ["PRIVATE-REGISTRY"]' | sudo tee -a /etc/containerd/config.toml 2>&1 | tee containerd.txt

sudo systemctl restart containerd 
sudo containerd config dump | tee containerd.txt

如果我理解了这个问题,您需要使用tee -a进行追加。

-a, --append append 到给定的文件,不要覆盖

一个简单的例子:

使用不带-a选项tee

echo hello | tee myfile
hello
echo hey | tee myfile
hey

所有以前的内容将被替换为最后的内容。

cat myfile
hey

现在使用-a标志,保存所有以前的内容。

echo hello | tee myfile
hello
echo hey | tee -a  myfile
hey

所有以前的内容都被保存。

cat myfile
hello
hey

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM