TKE 托管安装helm 取消 helm 告警

该博客介绍了如何在同网段的服务器上安装kubectl,并从阿里云和腾讯云源添加 Helm 仓库。内容包括设置 Kubernetes 配置文件、检查和修复 kubeconfig 文件的权限问题,以及更新 Helm 仓库。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

选择一个同网段的服务器,安装kubectl ,开启内网访问

 

cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
EOF

 yum install -y kubectl  && kubectl version

mkdir .kube

vim .kube/config

 

 添加腾讯源

[root@ansible-5 ~]# helm repo add tkemarket https://market-tke.tencentcloudcr.com/chartrepo/opensource-stable
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
"tkemarket" has been added to your repositories

添加阿里源

[root@ansible-5 ~]# helm repo add aliyun https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
"aliyun" has been added to your repositories

查看权限

[root@ansible-5 ~]# ll .kube/config 
-rw-r--r-- 1 root root 5545 Sep 28 10:34 .kube/config

解决这个告警,修改权限即可 600 :

[root@ansible-5 ~]# ll .kube/config 
-rw------- 1 root root 5545 Sep 28 10:34 .kube/config
[root@ansible-5 ~]# helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "tkemarket" chart repository
...Successfully got an update from the "aliyun" chart repository
Update Complete. ⎈Happy Helming!⎈

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值