Targets are used to manage the addresses of the remote Shipa servers.
Each target is identified by a label and an HTTP/HTTPS address. Shipa's client requires at least one target to connect to, and there's no default target. A user may have multiple targets, but only one will be used at a time.
Shipa Target Address
In order to find the target address for your Shipa instance, the command below can be executed in the cluster where Shipa was installed:
kubectl --namespace=shipa-system get svc shipa-ingress-nginx -o jsonpath="{.status.loadBalancer.ingress[0].ip}"
The command above will output the IP that should be used as the target on the steps below.
Adding Targets
$ shipa 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 Shipa instance when created.
It's also important to notice that a user can have multiple Shipa targets configured in their machine, so they can use labels to distinguish between the different Shipa targets.
Flags:
-s, --set-current |
---|
(= false) Add and define the target as the current target |
Listing Targets
$ shipa target list
Displays the list of targets available and added to Shipa's 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
$ shipa target set <label>
The command above changes the current target set for the Shipa client/server.
Removing Targets
$ shipa target remove
The command above removes a target set in the Shipa server.
Updated 3 months ago