If you are no longer using a Link Agent for testing, you can shut it down from the mabl app or the mabl CLI.
Once you remove a Link Agent, you cannot start it back up from the mabl app. If your goal is to temporarily stop routing traffic through Link, see our instructions on disabling mabl Link for a test environment.
Shutting down mabl Link
In the mabl app, you can shut down the Link Agent on the networking page: Settings > Networking.
Location of the shut down button
In the mabl CLI, you can shut down the Link Agent with the mabl link-agents terminate
command. See the CLI article on Link Agent commands for more details.
If a Link Agent manages multiple tunnels, shutting down any one of those tunnels causes the ensure Link Agent to shut down and close all of its managed tunnels.
Update your environments
If any mabl environments are associated with the Link Agent, edit the environment(s) and uncheck "Use link agent." Otherwise, tests running in those environments will start to fail.
Terminating Kubernetes-based Link Agents
If you click on the Shutdown button for a Link Agent in the mabl app, the Kubernetes deployment will spawn a replacement Link Agent within seconds to maintain your specified number of replicas. Similarly, pod-based Link Agents attempt to restart based on their Restart Policy.
To terminate a Kubernetes-based Link Agent, use the kubectl delete
command:
- For pod-based Link Agents:
kubectl delete pod mabl-link-agent -n <YOUR-NAMESPACE>
- For deployment-based Link Agents:
kubectl delete deployment mabl-link-agent-deployment -n <YOUR-NAMESPACE>
Link tunnel automatic cleanup
If your team manages many Link Agents and frequently accumulates a long list of Link Agents that are no longer relevant to your work, you can enable Link tunnel automatic cleanup to manage Link Agents at scale.
Link tunnel automatic cleanup removes tunnels that meet the following criteria:
- No active Link Agents are connected
- Not assigned to any environments
- Created more than 24 hours ago
Workspace owners can enable this setting on the Labs page: Settings > Labs.
Link tunnel automatic cleanup is currently available in early access. Prior to general availability, changes to the setting may be made without notice.