...
Code Block |
---|
apiVersion: v1 kind: Service metadata: name: agent-service namespace: openhorizon-agent spec: selector: app: agent ports: - protocol: TCP port: 8443 |
This k8s service definition includes a few notable aspects:
- The API host name provided to the application is the metadata.name field; HZN_ESS_API_ADDRESS = "agent-service"
- The API protocol is https; HZN_ESS_API_PROTOCOL="https"
- The API port is 8443; HZN_ESS_API_PORT=8443
- This k8s service is attached to an app called "agent" which is the app name given to the agent when it is installed.
- This service is defined in the "openhorizon-agent" k8s namespace.
In order for the above settings to be variable, i.e. set by the agent installer, the k8s service definition above needs to be conditioned to reflect those differences before it is installed to the edge cluster.
...