Search code examples
servicekubernetesconsulhashicorp-vault

How to register vault (Hashicorp-vault) as a service in consul (Hashicorp-consul), I am using kubernetes?


I'm running vault and consul as pods in kubernetes, while I'm checking consul catalog service it shows consul alone.

How can I register vault as a service?

I'd tried with the following link, but it didn't work. https://learn.hashicorp.com/consul/getting-started/services


Solution

  • For registering vault as a service you will have to do the following steps

    1. Create a file and write this {"service": {"name": "vault", "tags": ["vault-tag"], "port": 8200}} into it. Name it as vault.json
    2. Now, enter this command consul services register vault.json
    3. You can now see that vault is registered as a service vault registeration and checking the consul catalog service