# Agent Installation

### **Prerequisites**

Agent flag needs to be enabled in the sapor configuration (It is enabled by default; checking may not be necessary unless someone disables it.)**.**

```
kubectl edit secret oes-sapor-config -n isd-dev
The secret contains an application.yaml. Decode this.
echo xxxxxxxxxxx | base64 -d
This will have the line
  agent:
    enabled: true
```

The forwarder external host name needs to map with the agent-grpc service external ip address in ISD Namespac&#x65;**.**

<figure><img src="https://lh6.googleusercontent.com/S0cMrxmGmQHi7GwPpWzoREUIL7OYUEeyLoSppQ8C97WI6qOtv28bzr_aFpPBTr5hCPDs3YgdwS57MBLFsugV59ExvjPtv4FPhXylsqni0PyTtqQ3goPq0zyMpSPz9mz46E2wAWMS-rBVgHLzRMp06Xs" alt=""><figcaption></figcaption></figure>

```
agentHostname: controller.argo-dev.opsmx.net
remoteCommandHostname: controller.argo-dev.opsmx.net
```

{% hint style="info" %}
**Note:** The above step is only necessary **if you are creating the agent for the first time**; if it is done already, no need to do this for subsequent agent creations.
{% endhint %}

### **Apply the services.yaml**

```
$ kubectl apply -f services.yaml -n <AGENT-NAMESPACE>
```

### **Deploy agent manifest**

Apply the agent manifest

```
 $ kubectl apply -f <agent-manifest-file>.yaml -n <AGENT-NAMESPACE>
```

{% hint style="info" %}
**Note: The agent manifest name will be the same as the agent name you have given in ISD.**
{% endhint %}

Check the agent pod status; it should be in running state if it’s installed without any issues.

```
$ kubectl get pods -n <AGENT-NAMESPACE>
```
