# Mapping of host URL with agent-grpc service

Follow the instruction below to map a host URL with agent-grpc service.

1. Get the load balancer IP of controller agent in the ISD installed namespace using the below command.

   ```
   kubectl get svc -n opsmx-argo | grep agent-grpc
   ```

2. In this example the Load Balancer IP address is **34.172.225.153.** Refer to the below output.

   <pre data-overflow="wrap"><code>$ kubectl get svc -n opsmx-argo | grep agent-grpc
   agent-grpc                               LoadBalancer   10.68.9.229    34.172.225.153   9001:31016/TCP               2d21h
   </code></pre>

3. Choose the agent host URL as per your domain name \[For eg: if your domain name is ending with: \*.devops.com, the corresponding agent host URL should be: \<YOUR-CHOICE\_OF\_Controller-Name>.devops.com]. In this example, we are using the host URL as isdcontroller.agent.opsmx.net.

4. You need to map this Load Balancer IP to any of the DNS providers. Check the DNS entry using the nslookup command as shown below.

   <pre data-overflow="wrap"><code>nslookup isdcontroller.agent.opsmx.net
   </code></pre>

   \
   Refer the below output

   <pre data-overflow="wrap"><code>Server:		127.0.0.53
   Address:	127.0.0.53#53
   Non-authoritative answer:
   Name:	isdcontroller.agent.opsmx.net
   Address: 34.172.225.153
   </code></pre>

5. Run the below command to edit the controller config map “**opsmx-controller-controller1**”.&#x20;

   <pre data-overflow="wrap"><code>kubectl edit cm opsmx-controller-controller1 -n opsmx-argo
   </code></pre>

   \
   Replace the agentHostname and remoteCommandHostname in the config map under “**data**” section as mentioned below and save it.

   <pre data-overflow="wrap"><code>apiVersion: v1
   data:
     configFile: |
       serviceHostname: opsmx-controller-controller1
       agentHostname: isdcontroller.agent.opsmx.net
       remoteCommandHostname: isdcontroller.agent.opsmx.net
       controlHostname: opsmx-controller-controller1
       #agentAdvertisePort: "443"
       serverNames:
         - agent-grpc
   </code></pre>

6. Restart the controller pod using the command below.

   ```
   kubectl rollout restart deploy opsmx-controller-controller1 -n opsmx-argo
   ```

7. Now you are done with Controller configuration. This DNS can be used while configuring the agent with Argo.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.opsmx.com/opsmx-1/opsmx-intelligent-software-delivery-isd-platform-argo/user-guide/argo-cd-integration/mapping-of-host-url-with-agent-grpc-service.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
