- 积分
- 1193
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
本帖最后由 1320503165 于 2024-9-15 10:51 编辑
- z# j3 d/ p( h! C* p' p
5 Z& [+ D3 {5 S6 f4 }1 j# b [ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist; L+ |( `; W; n* v3 L' V+ x- J# P* C
[ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forward contents are not set to 1" L9 P+ c- n# X) g( w
- t$ k& ^3 W' y0 a2 b9 \3 f5 U( U% s+ j
|% s0 s0 D# {' ?) w& n+ R
: k4 y/ b7 v) R[root@kubernetes-master net]# vim /etc/sysctl.d/k8s.conf( i& n/ o7 q4 F8 O, k+ S6 E6 e
[root@kubernetes-master net]# modprobe br_netfilter, W+ @, C, W( _! `! |; b: _) M
[root@kubernetes-master net]# sysctl --system /etc/sysctl.d/k8s.conf
! E1 P \2 h* A2 D! q* Applying /usr/lib/sysctl.d/00-system.conf ..., F$ v& y5 D& d u/ Q3 a4 v! U
net.bridge.bridge-nf-call-ip6tables = 05 D, ?/ P1 P2 f" I
net.bridge.bridge-nf-call-iptables = 0
% K/ d. `) d4 l; anet.bridge.bridge-nf-call-arptables = 09 Q& y: I8 z) \# S! h
* Applying /usr/lib/sysctl.d/10-default-yama-scope.conf ...4 r; H, t- g- W! i, e
kernel.yama.ptrace_scope = 0- O9 V( f" d: i* b. o* o3 A
* Applying /usr/lib/sysctl.d/50-default.conf ...
/ }2 H; a3 ^* J8 h& Okernel.sysrq = 16
7 C) j3 O' G, O4 ckernel.core_uses_pid = 17 e1 F) h3 _, o' {4 c. }; ~
kernel.kptr_restrict = 1
7 x7 [! V/ `( c% q Ynet.ipv4.conf.default.rp_filter = 1
3 `& ^- X5 d2 t9 S& V* ^" _net.ipv4.conf.all.rp_filter = 1* z) e: j) G y O' Z6 j) V1 Z6 X$ U6 u
net.ipv4.conf.default.accept_source_route = 0 S- p o: i( M( W
net.ipv4.conf.all.accept_source_route = 0- e6 r& g+ X: [4 e- U
net.ipv4.conf.default.promote_secondaries = 1
7 {. n1 _% e" [0 Pnet.ipv4.conf.all.promote_secondaries = 1! }; T/ Z2 Z# K0 N6 B! Z6 N
fs.protected_hardlinks = 1; R7 }" B- e* N8 O: R* K6 z* Z8 w
fs.protected_symlinks = 18 x. ^3 Y4 f; Q/ _: F2 J+ W4 E9 q
* Applying /etc/sysctl.d/99-sysctl.conf ...
! L) d1 @6 o: Skernel.pid_max = 316448
/ K6 f( ]" g+ i1 z5 S' B3 T* k* Applying /etc/sysctl.d/k8s.conf ...; j* A' v6 L$ v1 ~
net.bridge.bridge-nf-call-ip6tables = 1
0 V& ?4 w r& l* v+ Z5 }: V% Pnet.bridge.bridge-nf-call-iptables = 1
$ N) h% M/ K) |( V& r+ G* Applying /etc/sysctl.conf ...
$ t! Z5 }' |" R( Dkernel.pid_max = 316448
5 Q g+ O5 P+ c* U# O$ o8 G[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 % F" U) Z0 P1 ~4 V, r6 [ K
[init] Using Kubernetes version: v1.28.0
/ ?. Q9 f5 ? Q[preflight] Running pre-flight checks: a! |" t* h( f2 t {/ S: B% \5 f. t0 K
error execution phase preflight: [preflight] Some fatal errors occurred:
" g$ U& h* x2 z: l8 d b/ }& G [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"
7 j$ V9 h% b0 n8 P. s. Btime="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"/ `* X6 I$ Q f& t
, error: exit status 1/ I3 ?. H3 V( F \" F/ J) _
[ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forward contents are not set to 10 x+ R. j7 G! u8 r4 N# e
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`( X2 v: N0 f( h' H: t7 L: C
To see the stack trace of this error execute with --v=5 or higher; ]' X5 I; I& U* A
[root@kubernetes-master net]# docker ps , G0 B) @& m& W1 ^7 w: w9 B# J
" A/ A2 F, {/ K# g6 dCannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?4 [. P% Y' H, _: E. Q. h$ h2 p
[root@kubernetes-master net]#
" d4 w; a! W. ?# k* k, n[root@kubernetes-master net]# systemctl restart docker.service
* J1 M0 w/ B% G; q[root@kubernetes-master net]# docker ps . R- G7 [3 {. c# o; a0 l
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES$ g8 p7 R9 a: }9 Z$ ]$ b
[root@kubernetes-master net]# systemctl enable docker.service & b, S1 b# }" s$ p9 W3 z
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.6 {$ c! N1 a, B' P7 g6 |% B$ j
[root@kubernetes-master net]# systemctl status cri-docker.service
" P+ f1 u; B J● cri-docker.service - CRI Interface for Docker Application Container Engine6 L A/ y7 Z9 @; c( D
Loaded: loaded (/usr/lib/systemd/system/cri-docker.service; enabled; vendor preset: disabled)# q) V6 e- J+ V$ F8 z t
Active: failed (Result: start-limit) since Sun 2024-09-15 10:46:51 CST; 1min 37s ago
+ |' c; c* ^' m* B8 K Docs: https://docs.mirantis.com
. i" p/ w* l3 Z. E% o- c Main PID: 2909 (code=exited, status=1/FAILURE)* C% R9 n- I2 M, u$ Z. }8 k$ ~
$ R; M+ R5 f5 E* z* y4 z) |Sep 15 10:46:49 kubernetes-master systemd[1]: Failed to start CRI Interface for Docker Application C...ne.
% q: U3 J" A X2 j2 h8 ISep 15 10:46:49 kubernetes-master systemd[1]: Unit cri-docker.service entered failed state.
1 q9 b* R, O) \& U9 m! K6 ZSep 15 10:46:49 kubernetes-master systemd[1]: cri-docker.service failed.) |! t U+ I1 z" w/ L$ E. e
Sep 15 10:46:51 kubernetes-master systemd[1]: cri-docker.service holdoff time over, scheduling restart.) X& ]9 l) L! o! _' [7 l7 Y# y
Sep 15 10:46:51 kubernetes-master systemd[1]: Stopped CRI Interface for Docker Application Container...ne.
8 f. r, K, M# K- uSep 15 10:46:51 kubernetes-master systemd[1]: start request repeated too quickly for cri-docker.service
( C o+ K: w# x3 Y; p* `Sep 15 10:46:51 kubernetes-master systemd[1]: Failed to start CRI Interface for Docker Application C...ne. Q7 d. P( R5 s3 C5 j
Sep 15 10:46:51 kubernetes-master systemd[1]: Unit cri-docker.service entered failed state.
0 V, E; k4 D( @3 ]; _, nSep 15 10:46:51 kubernetes-master systemd[1]: cri-docker.service failed.8 m) e4 P( e- s( k/ ~. X
Hint: Some lines were ellipsized, use -l to show in full.
) N5 h" F( Q, c[root@kubernetes-master net]# systemctl restart cri-docker.service
$ |- ^1 b! e6 K( I( i& x; H[root@kubernetes-master net]# systemctl status cri-docker.service
% D6 ] I( J- S* d6 ~" Y● cri-docker.service - CRI Interface for Docker Application Container Engine3 q3 U/ x. {* f6 T* w/ ?4 |3 i
Loaded: loaded (/usr/lib/systemd/system/cri-docker.service; enabled; vendor preset: disabled)
- `1 y% o! I: v' g6 M! M Active: active (running) since Sun 2024-09-15 10:48:38 CST; 1s ago
% u$ ?4 B+ r6 c$ k& B: h Docs: https://docs.mirantis.com3 J! ? B8 J! K9 j1 ?6 s
Main PID: 3339 (cri-dockerd)
& V: i6 G5 p& H1 H! i Tasks: 8
# G- @: o7 J' q H# b Memory: 16.2M+ ^8 M% N* _' @( x7 v* |5 q. S' K
CGroup: /system.slice/cri-docker.service0 o# _. t' s f: {; r
└─3339 /usr/bin/cri-dockerd --container-runtime-endpoint fd:// --pod-infra-container-image=r...
4 M7 u$ W2 h/ I' R
$ |( O A6 ~ K# W* i' J3 { RSep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...0s"$ }0 \# v( O% p, f
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...ne"; \3 F* @) x1 }( Z2 W& A) T
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...ni"! \% b# q H9 R+ d8 _4 C
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...ni"
: x' F9 f6 M3 xSep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...ive3 \# I% K8 s+ T7 x5 P; ~# G* v
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...fs"
8 I t! E4 X4 X7 k. b2 r+ [Sep 15 10:48:38 kubernetes-master systemd[1]: Started CRI Interface for Docker Application Container...ne.& l( M4 G2 U. b6 x) w- @
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...,}") w! s) r- C0 t7 S
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...e."/ c8 f. W% [4 ?' K9 ?
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...nd"
6 c' p" t$ Q4 c/ v+ A7 j2 I& U rHint: Some lines were ellipsized, use -l to show in full.% ]! y P+ X( E' P
- X& I. b. B; q |
|