在升级aip-server以使用etcdv3 api之后,Etcdctl会获得大量垃圾信息

时间:2018-05-17 06:44:04

标签: kubernetes etcd

我将etcd升级到v3.0.17,以便k8s使用etcdv3 api。

在etcd升级后,apiserver开始没有' storage-backend = etcd2'和' storage-media-type = application / json'定义,我注意到etcdctl get无法正确显示一些信息,如下所示:

/_egi_+_y/c-+fig+a-_/++be-_y_+e+/fi+ebea+-_-a_+-c-+f
{"+i+d":"C-+figMa-","a-iVe__i-+":"+1","+e+ada+a":{"+a+e":"fi+ebea+-_-a_+-    c-+f","+a+e_-ace":"++be-_y_+e+","+id":"9a09cef0-348c-11e7-ba37- 1418775d636e","c_ea+i-+Ti+e_+a+-":"2017-05-09T07:53:34Z"},"da+a":{"fi+ebea+.y++":"fi+ebea+:\+  -_-_-ec+-__:\+  -\+    i+-++_+y-e: +-g\+    d-c++e++_+y-e: _-a_+\+    fie+d_:\+      +a+e_-ace: ++be-_y_+e+\+    fie+d__++de___--+: +_+e\+    -a+h_:\+      - /+-g/*/*/_+de__\+  -\+    i+-++_+y-e: +-g\+    d-c++e++_+y-e: _-a_+\+    fie+d_:\+      +a+e_-ace: ++be-_y_+e+\+    fie+d__++de___--+: +_+e\+    -a+h_:\+      - /+-g/*/*/_+d-++\+\+-++-++:\+  +-g_+a_h:\+    h-_+_: [\"192.168.197.200:5044\",\"192.168.197.199:5044\"]\+    +-_+e_: 4\+    c-+-_e__i-+_+e+e+: 3\+    +-adba+a+ce: +_+e\+    i+de|: ++be-_y_+e+\+"}}

另外,我创建了一个新的pod,它存储在etcd中,如下所示:

# ETCDCTL_API=3 /opt/bin/etcdctl --endpoints http://10.3.7.27:2379 get /registry/pods/default/busybox-116p6
/registry/pods/default/busybox-116p6
k8s

v1Pod¯

ã
busybox-116pbusybox-default"-/api/v1/namespaces/default/pods/busybox-116p6*$1cc8a15c-5996-11e8-ac41-1418775d2f8528B
                                                                                                              ý¯ô׋ĉîZ
a--b+_yb-|Z&
c-++_-++e_-_e+i_i-+-ha_h
1615036418Z
--d-+e+-+a+e-ge+e_a+i-+1bû
++be_+e+e_.i-/c_ea+ed-byÞ{"+i+d":"Se_ia+izedRefe_e+ce","a-iVe__i-+":"+1","_efe_e+ce":{"+i+d":"Dae+-+Se+","+a+e_-ace":"defa+++","+a+e":"b+_yb-|","+id":"fa90b377-44a0-11e8-83ca-1418775d636e","a-iVe__i-+":"e|+e+_i-+_","_e_-+_ceVe__i-+":"100605842"}}
b.
*_ched++e_.a+-ha.++be_+e+e_.i-/c_i+ica+---d+R
    Dae+-+Se+b+_yb-|"$fa90b377-44a0-11e8-83ca-1418775d636e*e|+e+_i-+_/+1be+a108zý
1
defa+++-+-+e+-+8g9+2
defa+++-+-+e+-+8g9+¤è
b+_yb-|-_egi_+_y.-_-d.+ca_i+c.c-+/+--+_/b+_yb-|:g+ibc/bi+/_h-c+hi+e +_+e; d- _+ee- 3600; d-+e*BJH
defa+++-+-+e+-+8g9+-/+a_/_++/_ec_e+_/++be_+e+e_.i-/_e_+iceacc-+++"+/de+/+e_+i+a+i-+-+-g_
                                                                                        IfN-+P_e_e++€ˆ¢Fi+eA++ay_ 2
                                                                                                                C++_+e_Fi__+Bdefa+++Jdefa+++Raz06.++_.+ab.+ca_i+c.c-+X`h_‚Ššdefa+++-_ched++e_²8
!+-de.a+-ha.++be_+e+e_.i-/+-+ReadyE|i_+_"       N-E|ec++e²;
$+-de.a+-ha.++be_+e+e_.i-/++_eachab+eE|i_+_"    N-E|ec++eÆ
R+++i+g#

I+i+ia+izedT_+ý¯ô×*2
ReadyT_+þ¯ô×*2$

P-dSched++edT_+þ¯ô×*2"* 10.3.7.342172.29.224.22ý¯ô×B›
b+_yb-|


þ¯ô× (2-_egi_+_y.-_-d.+ca_i+c.c-+/+--+_/b+_yb-|:g+ibc:d-c+e_--+++ab+e://_egi_+_y.-_-d.+ca_i+c.c-+/+--+_/b+_yb-|@_ha256:9f5597958a437eacae2634ff71b9f28f94720a3bf43378c1db282693c4fed9e5BId-c+e_://4c54e2b9224f0b2545311f272b08af110a557941efa7d77f9207f8ec617be37dJ
Be_+Eff-_+"

这里有什么问题? apiserver通过v3 api写的数据是不可读的?

我的环境:Coreos 1298.5.0,kubernetes v1.7.10,etcd v3.0.17

1 个答案:

答案 0 :(得分:0)

storage-media-type=application/json标志应该是可读的。

您的命令输出看起来像JSON,但有类似破坏的编码。

尝试将输出转储到文件,而不是转发到终端,并通过其他工具或其他服务器读取。