網站首頁 編程語言 正文
刪除Helm使用時關于kubernetes文件的警告
使用helm命令行時如果有以下警告信息:
zhang@zhang:~$ helm ls
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /home/zhang/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /home/zhang/.kube/config
NAME ? ? ? ? ? ??? ?NAMESPACE?? ?REVISION?? ?UPDATED ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??? ?STATUS ??? ?CHART ? ? ??? ?APP VERSION
mysql-1617157855?? ?default ??? ?1 ? ? ? ?? ?2021-03-31 10:30:57.988087373 +0800 CST?? ?deployed?? ?mysql-1.6.9?? ?5.7.30
前兩行警告信息的意思是當前使用的kubernetes的配置文件不安全,同用戶組的用戶和其他用戶都可以讀取這個文件,查看如下:
zhang@zhang:~$ ll .kube/config?
-rw-rw-r-- 1 zhang zhang 4652 3月 ?17 12:30 .kube/config
可以看到組內用戶擁有讀寫權限(第二個rw),其他用戶擁有讀權限(第三個r)。
解決這個告警,修改權限即可:
zhang@zhang:~$ chmod g-rw ~/.kube/config
zhang@zhang:~$ chmod o-r ~/.kube/config
再次執行helm命令,告警信息已經沒有了:
zhang@zhang:~$ helm ls
NAME ? ? ? ? ? ??? ?NAMESPACE?? ?REVISION?? ?UPDATED ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??? ?STATUS ??? ?CHART ? ? ??? ?APP VERSION
mysql-1617157855?? ?default ??? ?1 ? ? ? ?? ?2021-03-31 10:30:57.988087373 +0800 CST?? ?deployed?? ?mysql-1.6.9?? ?5.7.30?
執行helm警告kube/config文件不安全問題
# helm list
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
NAME ? ?NAMESPACE ? ? ? REVISION ? ? ? ?UPDATED ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? STATUS ? ? ? ? ?CHART ? ? ? ? ? ? ? ? ? APP VERSION
jmeter ?default ? ? ? ? 1 ? ? ? ? ? ? ? 2021-06-30 14:24:54.191846532 +0800 CST deployed ? ? ? ?jmeter-suite-1.0.1 ? ? ?1.16.0
解決
# chmod g-rw ~/.kube/config
# chmod o-r ~/.kube/config
再次執行就不會出現告警信息了
原文鏈接:https://blog.csdn.net/JosephThatwho/article/details/115344730
相關推薦
- 2022-08-26 Input標簽自動校驗功能去除實現_React
- 2022-05-01 LINQ操作符SelectMany的用法_C#教程
- 2023-01-28 Shell中的單中括號和雙中括號的用法詳解_Linux
- 2022-05-01 Python類的定義和使用詳情_python
- 2022-08-15 centos7 redis5安裝
- 2023-11-15 LaTeX調整圖片大小的方法;自動調整合適的大小
- 2022-11-01 Kotlin?ContentProvider使用方法介紹_Android
- 2023-05-22 pytorch的Backward過程用時太長問題及解決_python
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支