|
|
本帖最后由 1320503165 于 2024-9-15 10:51 编辑 * B# [) y" P7 G$ Z* v) r" e! Z
$ [% g8 R/ E S5 v! }
[ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist
! y5 b! c; g9 P# F7 D. b! B. T [ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forward contents are not set to 1
% h( O2 J/ }- H0 j0 d, u4 b
2 _. m9 k# R4 D& V
; O! D1 r; I4 y( Q9 m' p8 Y
y/ n+ }3 X3 Z* v0 @3 b- z2 n- g! T. S8 a# e- k
[root@kubernetes-master net]# vim /etc/sysctl.d/k8s.conf
- m) D% s# y; |1 ~" y[root@kubernetes-master net]# modprobe br_netfilter
. r5 r( R& W; K( W& L: L[root@kubernetes-master net]# sysctl --system /etc/sysctl.d/k8s.conf ' f7 E2 T: X. e7 T: T5 M
* Applying /usr/lib/sysctl.d/00-system.conf ...
+ l: p$ G* L! c7 j% T( }0 U. Pnet.bridge.bridge-nf-call-ip6tables = 0
4 a2 i( C2 b4 wnet.bridge.bridge-nf-call-iptables = 0
* {0 H" {( U' ]( O- Q/ T, D7 nnet.bridge.bridge-nf-call-arptables = 02 j m, b* t9 s' ? I: U
* Applying /usr/lib/sysctl.d/10-default-yama-scope.conf ...
- y. |; A# d4 t3 @+ U$ m9 _kernel.yama.ptrace_scope = 03 U3 M0 ^1 z q/ w' o6 E" t
* Applying /usr/lib/sysctl.d/50-default.conf ...
0 D% C- `2 i; ^7 Z! \* i0 qkernel.sysrq = 16
; V% M& ? c1 u1 o6 A% tkernel.core_uses_pid = 1
* s C: r- E. ekernel.kptr_restrict = 1
7 B6 t! V" }4 l8 X/ f$ bnet.ipv4.conf.default.rp_filter = 1
$ n- n2 ]/ I# J |$ rnet.ipv4.conf.all.rp_filter = 1( Q7 S$ }4 A# r$ `- R
net.ipv4.conf.default.accept_source_route = 0/ h0 z1 @# r+ Q- [
net.ipv4.conf.all.accept_source_route = 0+ R9 @: ~" ^" ]( }) @6 Z) H6 T
net.ipv4.conf.default.promote_secondaries = 1
& w2 c, h {- v) Z! `& m* ~3 {$ j/ Nnet.ipv4.conf.all.promote_secondaries = 19 V" B7 b" m+ d- \4 a4 R
fs.protected_hardlinks = 1
" d; {; a* J) N% b9 P& P' `fs.protected_symlinks = 1& y- W) P4 S- [' E1 c4 W$ b7 b: I9 c
* Applying /etc/sysctl.d/99-sysctl.conf ...
5 J9 M- r, M) r! R: q8 F# w' gkernel.pid_max = 316448! u5 j6 c8 x* }3 c; n
* Applying /etc/sysctl.d/k8s.conf ...
W* H) l- m* _7 d6 Xnet.bridge.bridge-nf-call-ip6tables = 1
* Q4 e7 ?- E) y! inet.bridge.bridge-nf-call-iptables = 1
; d `( }/ V% o3 v) _* Applying /etc/sysctl.conf ...0 `' i4 e* G0 v: O
kernel.pid_max = 316448
6 {9 X5 v$ Q& ~+ h Z[root@kubernetes-master net]# kubeadm init --apiserver-advertise-address=192.168.8.190 --image-repository registry.aliyuncs.com/google_containers --kubernetes-version v1.28.0 --service-cidr=10.177.100.0/12 --pod-network-cidr=10.233.0.0/16 --cri-socket=unix:///var/run/cri-dockerd.sock
" @$ B, s7 t. [% w/ V[init] Using Kubernetes version: v1.28.0
# d) C9 |0 G6 ]2 V[preflight] Running pre-flight checks( j2 c$ i! O* b
error execution phase preflight: [preflight] Some fatal errors occurred:
* j& x: s6 z0 O# A7 R* W9 x$ k [ERROR CRI]: container runtime is not running: output: E0915 10:46:46.870746 2864 remote_runtime.go:616] "Status from runtime service failed" err="rpc error: code = Unavailable desc = connection closed before server preface received"2 m: f2 {* Y0 n3 w- j+ j1 g
time="2024-09-15T10:46:46+08:00" level=fatal msg="getting status of runtime: rpc error: code = Unavailable desc = connection closed before server preface received"
0 g, a5 o5 f5 j/ c, error: exit status 18 G v2 D8 h# g" h0 m
[ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forward contents are not set to 1
& t% n8 c, X4 S1 m2 k# ]0 E[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
( J$ ~, H9 X8 ?# \4 w! D7 ?To see the stack trace of this error execute with --v=5 or higher
* j" `0 p) a. ]* _$ Y4 U[root@kubernetes-master net]# docker ps / T% Z0 x" e% g
) B) K) Z9 z( j. d0 i8 j5 i) Q
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?. Z2 H5 B% `' E7 t, R. G" @8 @) y6 v
[root@kubernetes-master net]#
) F2 |, a' x" X[root@kubernetes-master net]# systemctl restart docker.service S3 s+ Z& t1 C+ [0 J; r( ]& a
[root@kubernetes-master net]# docker ps
& j6 b, u L( _1 [$ t# _CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES5 {' N* e. f: o5 P' ^
[root@kubernetes-master net]# systemctl enable docker.service
+ B+ i8 ^( p" _) rCreated symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
0 s5 o& Y% @' v% P& F O5 z; B[root@kubernetes-master net]# systemctl status cri-docker.service
4 R$ q4 t4 ^7 Q● cri-docker.service - CRI Interface for Docker Application Container Engine; G7 O1 `$ T, C
Loaded: loaded (/usr/lib/systemd/system/cri-docker.service; enabled; vendor preset: disabled)
+ ^( o4 M @& R8 |$ \# s Active: failed (Result: start-limit) since Sun 2024-09-15 10:46:51 CST; 1min 37s ago
' p' g* E! p: Q) d Docs: https://docs.mirantis.com1 U# i8 I: f F' L" L4 _
Main PID: 2909 (code=exited, status=1/FAILURE)
! K; _$ Q& I0 `' W, T; ~7 h' ?9 }( G1 }6 S3 d7 }' U/ `* l
Sep 15 10:46:49 kubernetes-master systemd[1]: Failed to start CRI Interface for Docker Application C...ne.
) e5 I7 N0 q' V% dSep 15 10:46:49 kubernetes-master systemd[1]: Unit cri-docker.service entered failed state.0 ~% x; Z, v7 i( o
Sep 15 10:46:49 kubernetes-master systemd[1]: cri-docker.service failed.
3 c2 M0 H) A- @1 f J7 ESep 15 10:46:51 kubernetes-master systemd[1]: cri-docker.service holdoff time over, scheduling restart.
. F3 S! e" E$ m0 CSep 15 10:46:51 kubernetes-master systemd[1]: Stopped CRI Interface for Docker Application Container...ne., f- a g* g' K: C. r
Sep 15 10:46:51 kubernetes-master systemd[1]: start request repeated too quickly for cri-docker.service
, }2 V% [4 o+ L, _7 w- C2 ISep 15 10:46:51 kubernetes-master systemd[1]: Failed to start CRI Interface for Docker Application C...ne.) Q' z! j6 f. i& K
Sep 15 10:46:51 kubernetes-master systemd[1]: Unit cri-docker.service entered failed state.
. a; m- Q" M2 S# C: [0 c! ~Sep 15 10:46:51 kubernetes-master systemd[1]: cri-docker.service failed., ?3 m$ z7 ~- x& V9 M, u( `
Hint: Some lines were ellipsized, use -l to show in full.
1 g3 o0 }+ q7 Y- h8 ^! g+ i[root@kubernetes-master net]# systemctl restart cri-docker.service
7 X$ T8 w$ {3 g: y* n5 G8 r[root@kubernetes-master net]# systemctl status cri-docker.service 7 O! Q! ?4 H" o' d _( C* V0 v
● cri-docker.service - CRI Interface for Docker Application Container Engine& ]1 {# [5 T) m- _
Loaded: loaded (/usr/lib/systemd/system/cri-docker.service; enabled; vendor preset: disabled)
; C% d1 V7 ^. j) Z' S7 w+ L, `4 a Active: active (running) since Sun 2024-09-15 10:48:38 CST; 1s ago! [' z: s9 [5 ]( \$ k6 }# `/ i
Docs: https://docs.mirantis.com
2 p) |4 Q- I+ V+ s/ k: f5 u Main PID: 3339 (cri-dockerd)
* a2 Z# ^, E5 O: i8 B/ A$ _ Tasks: 8! U6 v% [( B. N Y& a, ^- c; t
Memory: 16.2M, ~8 ~+ L* A5 w8 N5 ^5 V& k( t& _
CGroup: /system.slice/cri-docker.service" M; q1 t1 f7 |; J
└─3339 /usr/bin/cri-dockerd --container-runtime-endpoint fd:// --pod-infra-container-image=r...
& c- U0 h! w2 C: A6 v- ]& o2 l; y1 \$ f9 E n: v
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...0s"9 `/ p) P) o$ p2 P" |
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...ne"2 T: o1 _% x1 N J% j: a
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...ni"
' T6 M/ t' s8 h; ~- vSep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...ni"
0 X) h4 ?) x/ J5 @Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...ive; @" Q7 Q8 _5 p% E, b( \4 U3 e; J
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...fs"8 T/ u3 Q9 g: r6 O
Sep 15 10:48:38 kubernetes-master systemd[1]: Started CRI Interface for Docker Application Container...ne.& C/ K F2 X Q! o5 Q/ R4 i7 D7 f j# g
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...,}". U' M2 Y& L6 Q1 ?0 _: Q3 L
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...e."" Q4 H8 s2 q4 ~) r
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...nd"
8 ` C7 e" L* M) G0 @Hint: Some lines were ellipsized, use -l to show in full.# R3 H. f/ U x8 F- ^, ?
7 D5 G% Z6 A9 i/ e& g$ K
|
|