etcdctl 3.2版本执行 /opt/etcd/bin/etcdctl --cacert=/opt/etcd/ssl/ca.pem出错

简介: etcdctl 3.2版本执行 /opt/etcd/bin/etcdctl --cacert=/opt/etcd/ssl/ca.pem出错
 /opt/etcd/bin/etcdctl --cacert=/opt/etcd/ssl/ca.pem --cert=/opt/etcd/ssl/server.pem --key=/opt/etcd/ssl/server-key.pem --endpoints="https://192.
168.1.20:2379,https://192.168.1.21:2379,https://192.168.1.22:2379" put /coreos.com/network/config  '{ "Network": "172.17.0.0/16", "Backend": {"Type": "vxlan"}}'

报错

flag provided but not defined: -cacert

NAME:
   etcdctl - A simple command line client for etcd.

WARNING:
   Environment variable ETCDCTL_API is not set; defaults to etcdctl v2.
   Set environment variable ETCDCTL_API=3 to use v3 API or ETCDCTL_API=2 to use v2 API.

USAGE:
   etcdctl [global options] command [command options] [arguments...]
   
VERSION:
   3.2.12
   
COMMANDS:
     backup          backup an etcd directory
     cluster-health  check the health of the etcd cluster
     mk              make a new key with a given value
     mkdir           make a new directory
     rm              remove a key or a directory
     rmdir           removes the key if it is an empty directory or a key-value pair
     get             retrieve the value of a key
     ls              retrieve a directory
     set             set the value of a key
     setdir          create a new directory or update an existing directory TTL
     update          update an existing key with a given value
     updatedir       update an existing directory
     watch           watch a key for changes
     exec-watch      watch a key for changes and exec an executable
     member          member add, remove and list subcommands
     user            user add, grant and revoke subcommands
     role            role add, grant and revoke subcommands
     auth            overall auth controls
     help, h         Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --debug                          output cURL commands which can be used to reproduce the request
   --no-sync                        don't synchronize cluster information before sending request
   --output simple, -o simple       output response in the given format (simple, `extended` or `json`) (default: "simple")
   --discovery-srv value, -D value  domain name to query for SRV records describing cluster endpoints
   --insecure-discovery             accept insecure SRV records describing cluster endpoints
   --peers value, -C value          DEPRECATED - "--endpoints" should be used instead
   --endpoint value                 DEPRECATED - "--endpoints" should be used instead
   --endpoints value                a comma-delimited list of machine addresses in the cluster (default: "http://127.0.0.1:2379,http://127.0.0.1:4001")
   --cert-file value                identify HTTPS client using this SSL certificate file
   --key-file value                 identify HTTPS client using this SSL key file
   --ca-file value                  verify certificates of HTTPS-enabled servers using this CA bundle
   --username value, -u value       provide username[:password] and prompt if password is not supplied.
   --timeout value                  connection timeout per request (default: 2s)
   --total-timeout value            timeout for the command execution (except watch) (default: 5s)
   --help, -h                       show help
   --version, -v                    print the version

改成

/opt/etcd/bin/etcdctl --ca-file=/opt/etcd/ssl/ca.pem --cert-file=/opt/etcd/ssl/server.pem --key-file =/opt/etcd/ssl/server-key.pem --endpoints="https://192.
168.1.20:2379,https://192.168.1.21:2379,https://192.168.1.22:2379" put /coreos.com/network/config  '{ "Network": "172.17.0.0/16", "Backend": {"Type": "vxlan"}}'

OK

相关文章
|
7月前
|
Kubernetes 容器
Failed at step CHDIR spawning /opt/kubernetes/bin/etcd: No such file or directory
Failed at step CHDIR spawning /opt/kubernetes/bin/etcd: No such file or directory
87 0
|
3月前
|
Shell
8-10|我是用htop看到 /data/soft/cdn-rsync/rsync -w /data/soft/cdn-rsync server --listen :8863如何重启这个程序
8-10|我是用htop看到 /data/soft/cdn-rsync/rsync -w /data/soft/cdn-rsync server --listen :8863如何重启这个程序
|
4月前
|
存储 Kubernetes 安全
在K8S中,etcdctl如何使用?
在K8S中,etcdctl如何使用?
|
Shell Docker 容器
Docker - 解决同步容器与主机时间报错:Error response from daemon: Error processing tar file(exit status 1): invalid symlink "/usr/share/zoneinfo/UTC" -> "../usr/share/zoneinfo/Asia/Shanghai"
Docker - 解决同步容器与主机时间报错:Error response from daemon: Error processing tar file(exit status 1): invalid symlink "/usr/share/zoneinfo/UTC" -> "../usr/share/zoneinfo/Asia/Shanghai"
1223 0
Docker - 解决同步容器与主机时间报错:Error response from daemon: Error processing tar file(exit status 1): invalid symlink "/usr/share/zoneinfo/UTC" -> "../usr/share/zoneinfo/Asia/Shanghai"
|
JSON API Go
etcd的安装和使用
etcd的安装和使用
218 0
|
7月前
|
Shell Perl 容器
kubectl exec -it etcd-master -n kube-system /bin/bashkubectl exec [POD] [COMMAND]
kubectl exec -it etcd-master -n kube-system /bin/bashkubectl exec [POD] [COMMAND]
46 0
|
存储 前端开发
EtcdServer初始化
EtcdServer初始化
|
存储 Kubernetes 容器
Cert-manager 部署
Cert-manager 部署
368 0
|
关系型数据库 MySQL 数据库
mysql8.0 docker部署后连接报错caching_sha2_password could not be loaded
切记:一般情况下不建议使用容器方式部署数据库,此方式只是为了验证一些mysql8.0的特性,做学习和测试使用。
136 0
|
安全 数据安全/隐私保护
ETCD安全设置
ETCD安全设置
546 0