1. 程式人生 > >[kubernetes]Error from server (BadRequest):container install-cni is not valid for pod kube-dns

[kubernetes]Error from server (BadRequest):container install-cni is not valid for pod kube-dns

安裝完 Flannel 網路元件之後,發現 pod kube-flannel 的狀態為 CrashLoopBackOff,執行命令檢視日誌,提示如下資訊:

Error from server (BadRequest): container install-cni is not valid for pod kube-dns-6f4fd4bdf-qdhqb

出現這個是因為 pod kube-flannel 啟動了兩個容器 kube-flannel 和 install-cni,檢視日誌時需要指定檢視那個容器,可通過命令 -c <container_name> 指定,例如: kubectl logs -f pods/kube-flannel-ds-vkdzw -c install-cni -n kube-system。通過命令可以看到報錯資訊如下:
 

+ cp -f /etc/kube-flannel/cni-conf.json /etc/cni/net.d/10-flannel.conf
cp: can't create '/etc/cni/net.d/10-flannel.conf': Permission denied

這個是因為容器跟主機檔案系統有互動操作,需要關閉 SELinux,執行如下命令即可:

[[email protected] ~]$ sudo su -
[[email protected] ~]# setenforce 0
setenforce: SELinux is disabled
[[email protected]
~]# systemctl daemon-reload

檢視pod執行情況:

[[email protected] ~]$ kubectl get pod --all-namespaces
NAMESPACE     NAME                               READY     STATUS             RESTARTS   AGE
kube-system   etcd-mvxl1484                      1/1       Running            0          50m
kube-system   kube-apiserver-mvxl1484            1/1       Running            0          50m
kube-system   kube-controller-manager-mvxl1484   1/1       Running            0          50m
kube-system   kube-dns-6f4fd4bdf-qdhqb           2/3       CrashLoopBackOff   21         50m
kube-system   kube-flannel-ds-7248h              1/1       Running            0          38m
kube-system   kube-flannel-ds-bzdg4              1/1       Running            0          38m

刪除有問題的pod,會自動重新安裝

[[email protected] ~]$ kubectl delete pod kube-dns-6f4fd4bdf-qdhqb -n kube-system
pod "kube-dns-6f4fd4bdf-qdhqb" deleted

再看,已經正常

NAMESPACE     NAME                               READY     STATUS    RESTARTS   AGE
kube-system   etcd-mvxl1484                      1/1       Running   0          51m
kube-system   kube-apiserver-mvxl1484            1/1       Running   0          51m
kube-system   kube-controller-manager-mvxl1484   1/1       Running   0          51m
kube-system   kube-dns-6f4fd4bdf-4jj56           2/3       Running   0          55s
kube-system   kube-flannel-ds-7248h              1/1       Running   0          39m
kube-system   kube-flannel-ds-bzdg4              1/1       Running   0          39m

相關推薦

[kubernetes]Error from server (BadRequest):container install-cni is not valid for pod kube-dns

安裝完 Flannel 網路元件之後,發現 pod kube-flannel 的狀態為 CrashLoopBackOff,執行命令檢視日誌,提示如下資訊: Error from server (BadRequest): container install-cni is no

Error from server (Forbidden): Forbidden (user=sys

報錯 Error from server (Forbidden): Forbidden (user=system:anonymous, verb=get, resource=nodes, subresource=proxy) 暫時解決辦法 繫結一個cluster-admin的許可權。 kubectl

No resources found. Error from server (NotAcceptable): unknown (get pods)

問題:正確安裝kubectl後,可查詢到當前使用叢集服務,也可切換不同的叢集,但無法獲取當前執行的pods的資訊與所有的service,具體表現為 $ kubectl get po -nwx No resources found. Error from server (NotAcceptable): unk

Visual Studio 2017 error: Unable to start program, An operation is not legal in the current state

strong state star intro https ogr enable introduce gin For me, the solution (workaround) is to turn off JavaScript debugging on Chrome, w

Parameter infoDTOs of type T from private T com.ListVO.setInfoDTOs is not resolvable to a concrete type.

setter com 解決 inter 註釋 getter errors style err WARN org.glassfish.jersey.internal.Errors - The following warnings have been detected: WA

WARN: Establishing SSL connection without server's identity verification is not recommended

.com left strong ren time req jdbc連接 using new 0.要想用Java連接mysql數據庫,首先裝好JDK,配置好環境變量,將jdk*.*.*\lib放入classpath,將jdk*.*.*\bin放入path中(*.*.*表示版

iOS打包上傳ipa文件時,報錯<ERROR ITMS-90096: "Your binary is not optimized for iPhone 5 - New iPhone apps......>的解決方案

splay update 分享圖片 trait tin log .com bmi graphic 很長一段時間習慣了用企業級證書發布,最近的新項目使用Xcode 9.1發布到AppStore時遇到了一個小問題(emm..其實問題跟Xcode版本沒關系,我也不知道為什麽要聲明

SpringBoot連接Mysql數據庫警告:Establishing SSL connection without server's identity verification is not recommend

prop exist 原因 5.7 ide als character spring ati Java使用mysql-jdbc連接MySQL出現如下警告: Establishing SSL connection without server‘s identity

From data type varchar to varbinary is not allowed

SQLThe issue: insert into tb_Admin values (1,111, 'ricky',1234)Implicit conversion from data type varchar to varbinary is not allowed. Use the CONV

Establishing SSL connection without server's identity verification is not recommended

database ide lis ring LISHI ati void name -a SpringBoot 連接 MySQL 數據庫,但是卻獲得以下錯誤信息提示:Warning: Wed Dec 09 22:46:52 CET

解決Hive的Establishing SSL connection without server's identity verification is not recommended問題

問題描述: hive> Sat Oct 13 15:36:32 CST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According

Configuration Error: deployment source '(projectname): war exploded' is not valid

  Maybe you can try it in this process. 1.Open Project Structure add an artifacts (web application:exploded) from modles, select your modle,

在scala中連線mysql時出現錯誤:Establishing SSL connection without server's identity verification is not recomm

在Scala中連線mysql時,輸入命令: scala> rebuyDF.write.mode("append").jdbc("jdbc:mysql://localhost:3306/dbtaobao", "dbtaobao.rebuy", prop) 出現錯誤如下: Wed No

mysql登入提示ERROR 1524 (HY000): Plugin 'unix_socket' is not loaded解決方法

1 /etc/init.d/mysql stop 2 3 4 vim /etc/my.cnf新增 skip-grant-tables 5 mysql -u root 6 use mysql; 7 update user set password=PASSWORD("mynewpassword") wh

執行專案連線Mysql時出現警告Establishing SSL connection without server's identity verification is not recommende

     近期在跑一個專案的時候Idea的日誌窗口出現了下面的警告,該警告對執行測試的結果沒有影響,但是始終讓人不舒服,也不知道有沒有隱患,於是對該問題進行了瞭解和處理,警告內容如下:; Thu Dec 20 12:50:09 CST 2018 WARN: Esta

Kubernetes 主節點宕機恢復記錄 MountVolume.SetUp failed for volume "kube-dns-config"

       今天早上,發現原來執行的好好的Kubernetes叢集不能正常工作了,dashboard介面打不開,主節點上 docker ps 不顯示任何執行中容器,重啟 kubelet 後,短暫恢復,之後再次陷入不可用狀態,經過反覆重啟觀察,發現是etcd不斷重啟,最後失

啟動tomcat是出現錯誤( Parse Fatal Error at line 1 column 1: Content is not allowed in prolog.)

2010-3-8 9:38:58 org.apache.coyote.http11.Http11Protocol init 資訊: Initializing Coyote HTTP/1.1 on http-8080 2010-3-8 9:38:58 org.apache.c

Navicat for mysql 1130錯誤 用Navicat連線遠端MYSQL:報錯ERROR 1130: Host '192.168.1.3' is not allowed to connec

Navicat for mysql 1130錯誤 用Navicat連線遠端MYSQL,提示如下錯誤,我以為是自己的防火牆問題,但是關了,依然不行。  我認為這段英文,有點誤導,讓人感覺是自己這邊出了問題。  看解決方法吧  ERROR 1130: Host '192.168.1.3' is not allo

R包的安裝錯誤ERROR: dependency ‘plyr’ is not available for package ‘reshape2’

轉自:http://blog.csdn.net/earl211/article/details/48224939 我在ubuntu14.04上安裝ggplot2的時候出現一下錯誤: [plain] view plaincopyprint? ERROR:

Error in render: "TypeError: _self.$scopedSlots.default is not a function"

今天在做專案中遇到了如上圖這樣一個問題,專案是Vue+element-ui。原因是table中用了多個v-if,解決方案有兩個: 1、用v-show代替v-if(個人推薦用第二種); 2、在v-if條件語句中加key作為區分就不會報錯了。 <el-table