首页 > 其他分享 >consul 常用命令

consul 常用命令

时间:2023-04-13 20:44:07浏览次数:32  
标签:Interact consul agent cluster 常用命令 services Consul

使用帮助

Usage: consul [--version] [--help] <command> [<args>]

Available commands are:
    acl             Interact with Consul's ACLs
    agent           Runs a Consul agent
    catalog         Interact with the catalog
    config          Interact with Consul's Centralized Configurations
    connect         Interact with Consul Connect
    debug           Records a debugging archive for operators
    event           Fire a new event
    exec            Executes a command on Consul nodes
    force-leave     Forces a member of the cluster to enter the "left" state
    info            Provides debugging information for operators.
    intention       Interact with Connect service intentions
    join            Tell Consul agent to join cluster
    keygen          Generates a new encryption key
    keyring         Manages gossip layer encryption keys
    kv              Interact with the key-value store
    leave           Gracefully leaves the Consul cluster and shuts down
    lock            Execute a command holding a lock
    login           Login to Consul using an auth method
    logout          Destroy a Consul token created with login
    maint           Controls node or service maintenance mode
    members         Lists the members of a Consul cluster
    monitor         Stream logs from a Consul agent
    operator        Provides cluster-level tools for Consul operators
    peering         Create and manage peering connections between Consul clusters
    reload          Triggers the agent to reload configuration files
    rtt             Estimates network round trip time between nodes
    services        Interact with services
    snapshot        Saves, restores and inspects snapshots of Consul server state
    tls             Builtin helpers for creating CAs and certificates
    troubleshoot    CLI tools for troubleshooting Consul service mesh
    validate        Validate config files/directories
    version         Prints the Consul version
    watch           Watch for changes in Consul

常用命令

获取在当前节点注册的服务列表

# curl  http://127.0.0.1:8500/v1/agent/services

获取数据中心注册的服务

# curl  http://127.0.0.1:8500/v1/catalog/services

参考文档

https://developer.hashicorp.com/consul/api-docs

标签:Interact,consul,agent,cluster,常用命令,services,Consul
From: https://www.cnblogs.com/wangguishe/p/17316349.html

相关文章

  • git常用命令汇总
    (文章目录)仓库#在当前目录新建一个Git代码库$gitinit#新建一个目录,将其初始化为Git代码库$gitinit[project-name]#下载一个项目和它的整个代码历史$gitclone[url]配置#显示当前的Git配置$gitconfig--list#编辑Git配置文件$gitconfig-e[--glob......
  • Docker常用命令--镜像相关
    镜像相关镜像名称镜像名称一般分两部分组成:[repository]:[tag]。在没有指定tag时,默认是latest,代表最新版本的镜像  这里的mysql就是repository,5.7就是tag,合一起就是镜像名称,代表5.7版本的MySQL镜像。拉取、查看镜像从DockerHub中拉取一个nginx镜像并查看(1)首先去镜......
  • systemd 常用命令和配置
    #systemd配套命令hostnamectl  #查看设置主机名localectl    #查看设置本地化语⾔timedatectl  #查看设置时间时区loginctl     #查看登录⽤户journalctl    #⽇志管理 #配置目录/etc/systemd/system/#当前系统本地配置本地⽣......
  • Nginx常用命令
    nginx-cfilename 设置配置文件(nginx-c/conf/nginx.conf)nginx-sreload 重新加载Nginx配置文件,然后以优雅的方式重启Nginxnginx-sreopen 重启Nginxnginx-sstop 强制停止Nginx服务nginx-squit 优雅地停止Nginx服务(即处理完所有请求后再停止服务)nginx-t 检测配置文件是......
  • windows常用命令
     exe类英文中文英文中文notepad记事本calc计算器control控制面板mstsc远程桌面连接explorer资源管理器taskmgr任务管理器resmon资源监视器perfmon性能监视器regedit注册表编辑器osk屏幕键盘mspaint画图snippingtool截图工具writ......
  • 什么是Iaas-Paas和Saas,Docker镜像与容器,docker 启动设置镜像,docker启动与停止常用命令
    什么是Iaas-Paas和Saas,Docker镜像与容器,docker启动设置镜像,docker启动与停止常用命令,镜像相关命令,容器相关命令什么是Iaas-Paas和Saas#Iaas----->Infrastructure-as-a-Service(基础设施即服务) Iaas公司会提供场外服务器,存储和网络硬件,可以租用场外的服务器。节省了维护......
  • Docker CLI docker compose cp常用命令
    Docker是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的镜像中,然后发布到任何流行的Linux或Windows操作系统的机器上,也可以实现虚拟化。Docker是内核虚拟化,不使用Hypervisor是不完全虚拟化,依赖内核的特性实现资源隔离。本文主要介绍DockerCLI中d......
  • lsof-文件监控常用命令
    参考:lsof-文件监控常用命令_lsof-p_lucky多多的博客-CSDN博客lsof-文件监控常用命令_lsof-p_lucky多多的博客-CSDN博客......
  • Linux操作系统基础的常用命令
    1,Linux简介Linux是一种自由和开放源码的操作系统,存在着许多不同的Linux版本,但它们都使用了Linux内核。Linux可安装在各种计算机硬件设备中,比如手机、平板电脑、路由器、台式计算机。1.1Linux介绍Linux出现于1991年,是由芬兰赫尔辛基大学学生LinusTorvalds和后来加入的众多爱好者......
  • Docker CLI docker compose convert常用命令
    Docker是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的镜像中,然后发布到任何流行的Linux或Windows操作系统的机器上,也可以实现虚拟化。Docker是内核虚拟化,不使用Hypervisor是不完全虚拟化,依赖内核的特性实现资源隔离。本文主要介绍DockerCLI中d......