2022-08-30

現(xiàn)象:
1、在安裝完k8s以后,加載ui面:
kubectl create -f kubernetes-dashboard.yaml
2、查看容器狀態(tài):
[root@k8s-master software]# kubectl get pods --namespace kube-system NAME READY STATUS RESTARTS AGE kubernetes-dashboard-3852341777-135gm 0/1 ContainerCreating 0 5m
3、檢查報(bào)錯(cuò)信息:

`[root@k8s-master software]# kubectl describe pod kubernetes-dashboard-3852341777-135gm --namespace kube-system
Name: kubernetes-dashboard-3852341777-135gm
Namespace: kube-system
Node: 10.1.108.78/10.1.108.78
Start Time: Tue, 27 Jun 2017 17:18:35 +0800
Labels: k8s-app=kubernetes-dashboard

<pre class="prettyprint linenums prettyprinted" style="box-sizing: border-box; margin: 0px 0px 10px; padding: 10px; overflow-wrap: break-word; word-spacing: 0px; font-family: monospace, monospace; font-style: normal; line-height: 1.7; overflow: auto; display: block; word-break: break-all; background-color: rgb(245, 245, 245); border: 1px solid rgb(226, 226, 226); border-radius: 4px; font-size: 14px; color: rgb(51, 51, 51); font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">

  1. pod-template-hash=3852341777

</pre>

Annotations: kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicaSet","namespace":"kube-system","name":"kubernetes-dashboard-3852341777","uid":"985001e1-5b19-11e7-a...
Status: Pending
IP:
Controllers: ReplicaSet/kubernetes-dashboard-3852341777
Containers:
kubernetes-dashboard:

<pre class="prettyprint linenums prettyprinted" style="box-sizing: border-box; margin: 0px 0px 10px; padding: 10px; overflow-wrap: break-word; word-spacing: 0px; font-family: monospace, monospace; font-style: normal; line-height: 1.7; overflow: auto; display: block; word-break: break-all; background-color: rgb(245, 245, 245); border: 1px solid rgb(226, 226, 226); border-radius: 4px; font-size: 14px; color: rgb(51, 51, 51); font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">

  1. Container ID:
  2. Image: registry.sinosafe.com.cn:5000/sinosafe/kubernetes/kubernetes-dashboard:1.5.1
  3. Image ID:
  4. Port: 9090/TCP
  5. Args:
  6. --apiserver-host=http://10.1.108.77:8080
  7. State: Waiting
  8. Reason: ContainerCreating
  9. Ready: False
  10. Restart Count: 0
  11. Liveness: http-get http://:9090/ delay=30s timeout=30s period=10s #success=1 #failure=3
  12. Environment: <none>
  13. Mounts: <none>

</pre>

Conditions:
Type Status
Initialized True
Ready False
PodScheduled True
Volumes: <none>
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node-role.kubernetes.io/master=:NoSchedule
Events:
FirstSeen LastSeen Count From SubObjectPath Type Reason Message


5m 5m 1 default-scheduler Normal Scheduled Successfully assigned kubernetes-dashboard-3852341777-135gm to 10.1.108.78
5m 20s 6 kubelet, 10.1.108.78 Warning FailedSync Error syncing pod, skipping: failed to "CreatePodSandbox" for "kubernetes-dashboard-3852341777-135gm_kube-system(9858b797-5b19-11e7-a69f-842b2b5e0f11)" with CreatePodSandboxError: "CreatePodSandbox for pod "kubernetes-dashboard-3852341777-135gm_kube-system(9858b797-5b19-11e7-a69f-842b2b5e0f11)" failed: rpc error: code = 2 desc = unable to pull sandbox image "gcr.io/google_containers/pause-amd64:3.0": Error response from daemon: {"message":"Get https://gcr.io/v1/_ping: dial tcp 74.125.23.82:443: i/o timeout"}"

5m 7s 7 kubelet, 10.1.108.78 Warning MissingClusterDNS kubelet does not have ClusterDNS IP configured and cannot create Pod using "ClusterFirst" policy. Falling back to DNSDefault policy.
[root@k8s-master software]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
registry.sinosafe.com.cn:5000/sinosafe/jenkins latest 681ef98a247f 5 weeks ago 704 MB
registry.sinosafe.com.cn:5000/sinosafe/centos 7.1.1 d9c3f227207e 3 months ago 605 MB
registry.sinosafe.com.cn:5000/sinosafe/kubernetes/kubernetes-dashboard 1.5.1 1180413103fd 5 months ago 104 MB
daocloud.io/gfkchinanetquest/kubernetes-dashboard-amd64 v1.5.1 1180413103fd 5 months ago 104 MB
daocloud.io/daocloud/google_containers_pause-amd64 3.0 99e59f495ffa 13 months ago 747 kB
gcr.io/google_containers/pause-amd64 3.0 99e59f495ffa 13 months ago 747 kB
[root@k8s-master software]# kubectl describe pod kubernetes-dashboard-3852341777-135gm --namespace kube-system
Name: kubernetes-dashboard-3852341777-135gm
Namespace: kube-system
Node: 10.1.108.78/10.1.108.78
Start Time: Tue, 27 Jun 2017 17:18:35 +0800
Labels: k8s-app=kubernetes-dashboard

<pre class="prettyprint linenums prettyprinted" style="box-sizing: border-box; margin: 0px 0px 10px; padding: 10px; overflow-wrap: break-word; word-spacing: 0px; font-family: monospace, monospace; font-style: normal; line-height: 1.7; overflow: auto; display: block; word-break: break-all; background-color: rgb(245, 245, 245); border: 1px solid rgb(226, 226, 226); border-radius: 4px; font-size: 14px; color: rgb(51, 51, 51); font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">

  1. pod-template-hash=3852341777

</pre>

Annotations: kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicaSet","namespace":"kube-system","name":"kubernetes-dashboard-3852341777","uid":"985001e1-5b19-11e7-a...
Status: Pending
IP:
Controllers: ReplicaSet/kubernetes-dashboard-3852341777
Containers:
kubernetes-dashboard:

<pre class="prettyprint linenums prettyprinted" style="box-sizing: border-box; margin: 0px 0px 10px; padding: 10px; overflow-wrap: break-word; word-spacing: 0px; font-family: monospace, monospace; font-style: normal; line-height: 1.7; overflow: auto; display: block; word-break: break-all; background-color: rgb(245, 245, 245); border: 1px solid rgb(226, 226, 226); border-radius: 4px; font-size: 14px; color: rgb(51, 51, 51); font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">

  1. Container ID:
  2. Image: registry.sinosafe.com.cn:5000/sinosafe/kubernetes/kubernetes-dashboard:1.5.1
  3. Image ID:
  4. Port: 9090/TCP
  5. Args:
  6. --apiserver-host=http://10.1.108.77:8080
  7. State: Waiting
  8. Reason: ContainerCreating
  9. Ready: False
  10. Restart Count: 0
  11. Liveness: http-get http://:9090/ delay=30s timeout=30s period=10s #success=1 #failure=3
  12. Environment: <none>
  13. Mounts: <none>

</pre>

Conditions:
Type Status
Initialized True
Ready False
PodScheduled True
Volumes: <none>
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node-role.kubernetes.io/master=:NoSchedule
Events:
FirstSeen LastSeen Count From SubObjectPath Type Reason Message


10m 10m 1 default-scheduler Normal Scheduled Successfully assigned kubernetes-dashboard-3852341777-135gm to 10.1.108.78
9m 18s 11 kubelet, 10.1.108.78 Warning FailedSync Error syncing pod, skipping: failed to "CreatePodSandbox" for "kubernetes-dashboard-3852341777-135gm_kube-system(9858b797-5b19-11e7-a69f-842b2b5e0f11)" with CreatePodSandboxError: "CreatePodSandbox for pod "kubernetes-dashboard-3852341777-135gm_kube-system(9858b797-5b19-11e7-a69f-842b2b5e0f11)" failed: rpc error: code = 2 desc = unable to pull sandbox image "gcr.io/google_containers/pause-amd64:3.0": Error response from daemon: {"message":"Get https://gcr.io/v1/_ping: dial tcp 74.125.23.82:443: i/o timeout"}"

10m 7s 12 kubelet, 10.1.108.78 Warning MissingClusterDNS kubelet does not have ClusterDNS IP configured and cannot create Pod using "ClusterFirst" policy. Falling back to DNSDefault policy.
4、查看本地鏡像(本地gcr.io/google_containers/pause-amd64已經(jīng)有這個(gè)鏡像了轴术,鏡像是從docker pull daocloud.io/daocloud/google_containers_pause-amd64:3.0下載的):

[root@k8s-master ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
registry.sinosafe.com.cn:5000/sinosafe/jenkins latest 681ef98a247f 5 weeks ago 704 MB
registry.sinosafe.com.cn:5000/sinosafe/centos 7.1.1 d9c3f227207e 3 months ago 605 MB
daocloud.io/gfkchinanetquest/kubernetes-dashboard-amd64 v1.5.1 1180413103fd 5 months ago 104 MB
registry.sinosafe.com.cn:5000/sinosafe/kubernetes/kubernetes-dashboard 1.5.1 1180413103fd 5 months ago 104 MB
daocloud.io/daocloud/google_containers_pause-amd64 3.0 99e59f495ffa 13 months ago 747 kB
gcr.io/google_containers/pause-amd64 3.0 99e59f495ffa 13 months ago 747 kB
`

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市钦无,隨后出現(xiàn)的幾起案子逗栽,更是在濱河造成了極大的恐慌,老刑警劉巖铃诬,帶你破解...
    沈念sama閱讀 212,542評(píng)論 6 493
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件祭陷,死亡現(xiàn)場(chǎng)離奇詭異苍凛,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)兵志,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,596評(píng)論 3 385
  • 文/潘曉璐 我一進(jìn)店門醇蝴,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人想罕,你說我怎么就攤上這事悠栓。” “怎么了按价?”我有些...
    開封第一講書人閱讀 158,021評(píng)論 0 348
  • 文/不壞的土叔 我叫張陵惭适,是天一觀的道長(zhǎng)。 經(jīng)常有香客問我楼镐,道長(zhǎng)癞志,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 56,682評(píng)論 1 284
  • 正文 為了忘掉前任框产,我火速辦了婚禮凄杯,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘秉宿。我一直安慰自己戒突,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 65,792評(píng)論 6 386
  • 文/花漫 我一把揭開白布描睦。 她就那樣靜靜地躺著膊存,像睡著了一般。 火紅的嫁衣襯著肌膚如雪忱叭。 梳的紋絲不亂的頭發(fā)上隔崎,一...
    開封第一講書人閱讀 49,985評(píng)論 1 291
  • 那天,我揣著相機(jī)與錄音窑多,去河邊找鬼仍稀。 笑死,一個(gè)胖子當(dāng)著我的面吹牛埂息,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播遥巴,決...
    沈念sama閱讀 39,107評(píng)論 3 410
  • 文/蒼蘭香墨 我猛地睜開眼千康,長(zhǎng)吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼!你這毒婦竟也來了铲掐?” 一聲冷哼從身側(cè)響起拾弃,我...
    開封第一講書人閱讀 37,845評(píng)論 0 268
  • 序言:老撾萬榮一對(duì)情侶失蹤,失蹤者是張志新(化名)和其女友劉穎摆霉,沒想到半個(gè)月后豪椿,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體奔坟,經(jīng)...
    沈念sama閱讀 44,299評(píng)論 1 303
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 36,612評(píng)論 2 327
  • 正文 我和宋清朗相戀三年搭盾,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了咳秉。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 38,747評(píng)論 1 341
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡鸯隅,死狀恐怖澜建,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情蝌以,我是刑警寧澤炕舵,帶...
    沈念sama閱讀 34,441評(píng)論 4 333
  • 正文 年R本政府宣布,位于F島的核電站跟畅,受9級(jí)特大地震影響咽筋,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜徊件,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 40,072評(píng)論 3 317
  • 文/蒙蒙 一晤硕、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧庇忌,春花似錦舞箍、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,828評(píng)論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至略就,卻和暖如春捎迫,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背表牢。 一陣腳步聲響...
    開封第一講書人閱讀 32,069評(píng)論 1 267
  • 我被黑心中介騙來泰國打工窄绒, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人崔兴。 一個(gè)月前我還...
    沈念sama閱讀 46,545評(píng)論 2 362
  • 正文 我出身青樓彰导,卻偏偏與公主長(zhǎng)得像,于是被迫代替她去往敵國和親敲茄。 傳聞我的和親對(duì)象是個(gè)殘疾皇子位谋,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 43,658評(píng)論 2 350

推薦閱讀更多精彩內(nèi)容