# Installing Connectware Agents Without a License Key Using the connectware-agent Helm Chart

## Prerequisites

* Connectware is [installed and configured](/2-1-2/documentation/installation-and-upgrades/installing-connectware/installing-connectware-kubernetes.md).
* A custom image registry to mirror Connectware images **or** access to an existing kubernetes.io/dockerconfigjson secret providing access to the Cybus image registry (see text for details).
* [Helm version 3](https://helm.sh/docs/intro/quickstart/#install-helm) is installed on your system.
* [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) is installed on your system.
* kubectl configured with the current context pointing to your target cluster ([Configure Access to Multiple Clusters](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/)).
* Decided on a Kubernetes namespace to use.

Follow this guide if you want to install agents using the connectware-agent Helm chart without providing your license key.

You have two options to achieve this:

* Providing a manually created pull secret, or use the pull secret provided by Connectware
* Using a custom image registry

The agents will still verify a valid license for your Connectware once you register them

## Installing Using a Manually Created Pull Secret

If you don’t enter a license key, you can still install the agent if you provide an already existing Kubernetes secret of type `kubernetes.io/dockerconfigjson`.

Connectware creates a secret like this named `cybus-docker-registry`. If you install agents in the same namespace as Connectware itself, you can use this secret by listing it in the `protocolMapperAgentDefaults.image.pullSecrets` list of your `values.yaml` file:

{% code lineNumbers="true" %}

```yaml
# not needed when supplying another pullSecret
# licenseKey:
protocolMapperAgentDefaults:
  image:
    pullSecrets:
      - name: cybus-docker-registry
```

{% endcode %}

If your Connectware installation is in a different namespace, you can copy the secret from your Connectware namespace to the target namespace by using this command:

{% code lineNumbers="true" %}

```bash
kubectl get secret cybus-docker-registry --namespace=<connectware-namespace> -o yaml | sed 's/namespace: .*/namespace: <agent-namespace>/' | kubectl apply -f -
```

{% endcode %}

**Example**

{% code lineNumbers="true" %}

```bash
kubectl get secret cybus-docker-registry --namespace=connectware -o yaml | sed 's/namespace: .*/namespace: connectware-agent/' | kubectl apply -f -
```

{% endcode %}

If you need to copy between Kubernetes clusters, you can use the `--context` parameter of kubectl to target your local contexts.

Of course you can also use a completely manually created secret, as long as it provides access to the registry used to pull the agents `protocol-mapper` image.

## Installing Using a Custom Registry

You can also use a custom registry to provide the protocol-mapper image for the agent.

In this case, set this registry in the image.registry inside the protocolMapperAgentDefaults section in your `values.yaml` file.

**Example**

{% code lineNumbers="true" %}

```yaml
# not needed when supplying another image registry
# licenseKey:
protocolMapperAgentDefaults:
  image:
    registry: registry.company.tld/cybus
```

{% endcode %}

If your custom registry requires authentication, you must also provide a manually created kubernetes.io/dockerconfigjson secret in the protocolMapperAgentDefaults.image.pullSecrets list of your `values.yaml` file.

**Example**

{% code lineNumbers="true" %}

```yaml
# not needed when supplying another image registry
# licenseKey:
protocolMapperAgentDefaults:
  image:
    registry: registry.company.tld/cybus
    pullSecrets:
      - name: my-company-pull-secret
```

{% endcode %}

**Hint**

kubernetes.io/dockerconfigjson secrets can be created with this command:

{% code lineNumbers="true" %}

```bash
kubectl create secret <secret-name> --docker-server=<registry-address> --docker-username=<username> --docker-password=<password> --docker-email=<user-email>
```

{% endcode %}


---

# 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.cybus.io/2-1-2/documentation/agents/agents-in-kubernetes/installing-connectware-agents-without-a-license-key-using-the-connectware-agent-helm-chart.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.
