網站首頁 編程語言 正文
刪除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-02-05 flask報錯:The method is not allowed for the requeste
- 2022-04-08 Android接入阿里云熱修復介紹_Android
- 2022-03-30 py3nvml實現GPU相關信息讀取的案例分析_python
- 2022-06-13 harbor可視化私有鏡像倉庫環境及服務部署示例_docker
- 2022-04-11 【Android】覺得不好看?自定義CheckBox樣式
- 2023-06-16 Dubbo?系列JDK?SPI?原理解析_服務器其它
- 2022-10-17 QT實現TCP網絡聊天室_C 語言
- 2022-07-02 css文字顯示兩行,溢出顯示省略號,點擊查看更多
- 最近更新
-
- 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同步修改后的遠程分支