API Target Management

Targets are used to manage the addresses of the remote Lens AppIQ API endpoint.

Each target is identified by a label and an HTTPS address. The Lens AppIQ client requires at least one target to connect to. A user may have multiple targets, but only one will be used at a time.

πŸ“˜

Lens AppIQ API Target Address

$ lapps target add api api.lenscloud.io -s

Adding Targets

lapps target add <label> <target> [--set-current|-s]

The command above adds a new entry to the list of available targets.

πŸ“˜

Target Label

Please note that the label flag used in the command above can be any name chosen by the user and not necessarily any label or name tied to the Lens AppIQ instance when created.

It's also important to notice that a user can have multiple Lens AppIQ targets configured in their machine, so they can use labels to distinguish between the different Lens AppIQ targets.

Flags:

-s, --set-current
(= false) Add and define the target as the current target

πŸ“˜

Self-Hosted Lens AppIQ Target Address

You can run the command below to find the target address for your Self-Hosted Lens AppIQ instance:

kubectl --namespace=shipa-system get svc shipa-ingress-nginx -o jsonpath="{.status.loadBalancer.ingress[0].ip}"

You should run the command above in the cluster where Lens AppIQ was installed, and it will output the IP that should be used as the target on the steps below.

Listing Targets

lapps target list

Displays the list of targets available and added to Lens AppIQ client, marking the current one.

Additional available commands related to target:

  • target add: adds a new target to the list of targets
  • target set: defines one of the targets in the list as the current target
  • target remove: removes one target from the list

Setting Target

lapps target set <label>

The command above changes the current target set for the Lens AppIQ client/server.

Removing Targets

lapps target remove

The command above removes a target set in the Lens AppIQ server.