format cli
parent
336a038623
commit
6ce6ea10f0
|
@ -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`指定输出格式
|
||||
|
|
Loading…
Reference in New Issue