DocsTelepresence OSSInstall/Uninstall the Traffic Manager
Install/Uninstall the Traffic Manager
Telepresence uses a traffic manager to send/recieve cloud traffic to the user. Telepresence uses Helm under the hood to install the traffic manager in your cluster. The telepresence
binary embeds both helm
and a helm-chart for a traffic-manager that is of the same version as the binary.
Prerequisites
Before you begin, you need to have Telepresence installed. In addition, you may need certain prerequisites depending on your cloud provider and platform. See the cloud provider installation notes for more.
Install the Traffic Manager
The telepresence cli can install the traffic manager for you. The basic install will install the same version as the client used.
Install the Telepresence Traffic Manager with the following command:
Customizing the Traffic Manager.
For details on what the Helm chart installs and what can be configured, see the Helm chart configuration on artifacthub.
Create a values.yaml file with your config values.
Run the
install
command with the--values
flag set to the path to your values file:alternatively, provide values using the
--set
flag:
Install into custom namespace
The Helm chart supports being installed into any namespace, not necessarily ambassador
. Simply pass a different namespace
argument to
telepresence helm install
. For example, if you wanted to deploy the traffic manager to the staging
namespace:
Note that users of Telepresence will need to configure their kubeconfig to find this installation of the Traffic Manager:
See the kubeconfig documentation for more information.
Upgrading/Downgrading the Traffic Manager.
Download the cli of the version of Telepresence you wish to use.
Run the
upgrade
command. Optionally with--values
and/or--set
flagsYou can also use the
--reuse-values
or--reset-values
to specify if previously installed values should be reused or reset.
Uninstall
The telepresence cli can uninstall the traffic manager for you using the telepresence helm uninstall
.
Uninstall the Telepresence Traffic Manager and all the agents installed by it using the following command:
RBAC
Installing a namespace-scoped traffic manager
You might not want the Traffic Manager to have permissions across the entire kubernetes cluster, or you might want to be able to install multiple traffic managers per cluster (for example, to separate them by environment). In these cases, the traffic manager supports being installed with a namespace scope, allowing cluster administrators to limit the reach of a traffic manager's permissions.
For example, suppose you want a Traffic Manager that only works on namespaces dev
and staging
.
To do this, create a values.yaml
like the following:
This can then be installed via:
NOTE Do not install namespace-scoped Traffic Managers and a global Traffic Manager in the same cluster, as it could have unexpected effects.
Namespace collision detection
The Telepresence Helm chart will try to prevent namespace-scoped Traffic Managers from managing the same namespaces.
It will do this by creating a ConfigMap, called traffic-manager-claim
, in each namespace that a given install manages.
So, for example, suppose you install one Traffic Manager to manage namespaces dev
and staging
, as:
You might then attempt to install another Traffic Manager to manage namespaces staging
and prod
:
This would fail with an error:
To fix this error, fix the overlap either by removing staging
from the first install, or from the second.
Namespace scoped user permissions
Optionally, you can also configure user rbac to be scoped to the same namespaces as the manager itself. You might want to do this if you don't give your users permissions throughout the cluster, and want to make sure they only have the minimum set required to perform telepresence commands on certain namespaces.
Continuing with the dev
and staging
example from the previous section, simply add the following to values.yaml
(make sure you set the subjects
!):
Installing RBAC only
Telepresence Traffic Manager does require some RBAC for the traffic-manager deployment itself, as well as for users.
To make it easier for operators to introspect / manage RBAC separately, you can use rbac.only=true
to
only create the rbac-related objects.
Additionally, you can use clientRbac.create=true
and managerRbac.create=true
to toggle which subset(s) of RBAC objects you wish to create.