format cli

pull/277/head
chaosky 2018-08-29 18:11:59 +08:00
parent 336a038623
commit 6ce6ea10f0
1 changed files with 4 additions and 1 deletions

View File

@ -9,7 +9,10 @@ ETCDCTL_API=3 etcdctl get /registry/namespaces/default -w=json|python -m json.to
如果是使用 kubeadm 创建的集群,在 Kubenretes 1.11 中etcd 默认使用 tls ,这时你可以在 master 节点上使用以下命令来访问 etcd
```bash
ETCDCTL_API=3 etcdctl --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/peer.crt --key=/etc/kubernetes/pki/etcd/peer.key get /registry/namespaces/default -w=json | jq .
ETCDCTL_API=3 etcdctl --cacert=/etc/kubernetes/pki/etcd/ca.crt \
--cert=/etc/kubernetes/pki/etcd/peer.crt \
--key=/etc/kubernetes/pki/etcd/peer.key \
get /registry/namespaces/default -w=json | jq .
```
- `-w`指定输出格式