您好,登錄后才能下訂單哦!
這篇文章主要講解了“Kubernetes 1.16.x升級(jí)后的問題有哪些”,文中的講解內(nèi)容簡(jiǎn)單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來(lái)研究和學(xué)習(xí)“Kubernetes 1.16.x升級(jí)后的問題有哪些”吧!
除了apiserver/controller/scheduler幾個(gè)主要的服務(wù)的鏡像版本變?yōu)?.16.3之外,其它包括:
etcd使用的是3.3.15-0(還不是最新的4.x系列)。
CoreDNS使用的是 1.6.2(1.15.x還是1.3.1,變化比較大),這個(gè)會(huì)引起啟動(dòng)失敗。
Ubuntu系統(tǒng)自動(dòng)升級(jí)Docker-CE到了19.3.4,但是使用kubectl get node -owide獲取節(jié)點(diǎn)信息發(fā)現(xiàn),始終是Not Ready狀態(tài)。
查看狀態(tài):kubectl describe node/podc01,發(fā)現(xiàn)CNI失敗。
將其降級(jí)到19.3.2后就可以了。
方法:
查看可用版本:sudo apt list docker-ce -a
安裝制定版本:sudo apt install docker-ce=xxxxxx
Update the /etc/docker/daemon.json
CoreDNS使用的是 1.6.2(1.15.x還是1.3.1,變化比較大),這個(gè)會(huì)引起啟動(dòng)失敗。
參見 https://github.com/Azure/aks-engine/pull/1493
主要原因是直接對(duì)Docker Image升級(jí)的話,配置參數(shù)沒有同步升級(jí)。
但是老的參數(shù)對(duì)新的版本又不適用,這個(gè)就比較悲催了。
只能期待發(fā)布一個(gè)新的參數(shù)或升級(jí)工具,或者以后CoreDNS將跨版本的配置參數(shù)封裝在鏡像里。
目前這個(gè)問題還沒有更好的解決方案,等待CoreDNS社區(qū)牛人出手。
Dashboard 1.x只支持到1.15,升級(jí)鏡像到1.10.1版本也不行,而且不再維護(hù)、更新了。
Kubernetes 1.16.x只能使用Dashboard 2.x。
但是這個(gè)呢,目前還在開發(fā)中,最新的是Beta5。
Dashboard 2.x有幾個(gè)大的變化:
這個(gè)對(duì)中國(guó)用戶到是方便了,可以系統(tǒng)直接pull下來(lái)。
缺省的安裝模版中namespace為kubernetes-dashboard,不是kube-system了。
Docker image位置變了,從gcr摘出來(lái)了,變?yōu)閗ubernetesui/dashboard:v2.0.0-beta5。
安裝指示安裝完Dashboard 2.x,登錄到系統(tǒng),信息顯示不出來(lái)。
原來(lái)的JupuyterHub for K8s運(yùn)行得好好的,升級(jí)完后Server就啟動(dòng)不起來(lái)了。
進(jìn)去查看信息:
supermap@podc01:~$ kubectl get pod -n jupyter -owide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES hub-75d575499b-6d76n 1/1 Running 0 19m 10.244.0.15 podc02 <none> <none> proxy-589655677b-qcfrm 1/1 Running 0 19m 10.244.1.140 podc03 <none> <none> kubectl logs hub-75d575499b-6d76n -n jupyter
hub和proxy的pod和svc都是可以的。
進(jìn)一步檢查hub的日志:
kubectl logs pod/hub-75d575499b-6d76n -n jupyter
得到下面的出錯(cuò)信息,是JupyterHub啟動(dòng)Notebook Server是執(zhí)行腳本過程中出錯(cuò):
E 2019-10-28 07:46:58.604 JupyterHub log:158] 500 GET /hub/user/supermap/ (supermap@10.244.7.0) 1028.54ms [I 2019-10-28 07:47:18.636 JupyterHub log:158] 302 GET /hub/spawn -> /user/supermap/ (supermap@10.244.7.0) 167.95ms [I 2019-10-28 07:47:18.672 JupyterHub log:158] 302 GET /user/supermap/ -> /hub/user/supermap/ (@10.244.7.0) 1.02ms [E 2019-10-28 07:47:19.404 JupyterHub user:477] Unhandled error starting supermap's server: '<' not supported between instances of 'datetime.datetime' and 'NoneType' [E 2019-10-28 07:47:19.724 JupyterHub gen:974] Exception in Future <Task finished coro=<BaseHandler.spawn_single_user.<locals>.finish_user_spawn() done, defined at /usr/local/lib/python3.6/dist-packages/jupyterhub/handlers/base.py:619> exception=TypeError("'<' not supported between instances of 'datetime.datetime' and 'NoneType'",)> after timeout Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/tornado/gen.py", line 970, in error_callback future.result() File "/usr/local/lib/python3.6/dist-packages/jupyterhub/handlers/base.py", line 626, in finish_user_spawn await spawn_future File "/usr/local/lib/python3.6/dist-packages/jupyterhub/user.py", line 489, in spawn raise e File "/usr/local/lib/python3.6/dist-packages/jupyterhub/user.py", line 409, in spawn url = await gen.with_timeout(timedelta(seconds=spawner.start_timeout), f) File "/usr/local/lib/python3.6/dist-packages/kubespawner/spawner.py", line 1648, in _start events = self.events File "/usr/local/lib/python3.6/dist-packages/kubespawner/spawner.py", line 1503, in events for event in self.event_reflector.events: File "/usr/local/lib/python3.6/dist-packages/kubespawner/spawner.py", line 62, in events key=lambda x: x.last_timestamp, TypeError: '<' not supported between instances of 'datetime.datetime' and 'NoneType'
目前,還沒有找到好的解決辦法,只能先放到項(xiàng)目的issue里,等著。
下面是一個(gè)臨時(shí)的補(bǔ)丁方法(親測(cè)可用):
kubectl patch deploy -n jupyter hub --type json --patch '[{"op": "replace", "path": "/spec/template/spec/containers/0/command", "value": ["bash", "-c", "\nmkdir -p ~/hotfix\ncp -r /usr/local/lib/python3.6/dist-packages/kubespawner ~/hotfix\nls -R ~/hotfix\npatch ~/hotfix/kubespawner/spawner.py << EOT\n72c72\n< key=lambda x: x.last_timestamp,\n---\n> key=lambda x: x.last_timestamp and x.last_timestamp.timestamp() or 0.,\nEOT\n\nPYTHONPATH=$HOME/hotfix jupyterhub --config /srv/jupyterhub_config.py --upgrade-db\n"]}]'
感謝各位的閱讀,以上就是“Kubernetes 1.16.x升級(jí)后的問題有哪些”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對(duì)Kubernetes 1.16.x升級(jí)后的問題有哪些這一問題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是億速云,小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。