This add-on integrates Teleport and its command line tool, tsh into your DDEV project.
Teleport is an open-source platform that provides secure access to SSH, Kubernetes, databases, and internal applications. The tsh
command allows users to connect to infrastructure via Teleport and manage their resources. If your infrastructure is behind a Teleport proxy, this add-on allows you to:
tsh
commands directly within your DDEV project, andIt is recommended to use this add-on in conjunction with the DDEV Kubernetes add-on. If you have DDEV >=1.24.8 this will be done automagically! If not, please install it first:
ddev add-on get MurzNN/ddev-kubernetes
To install the ddev-tsh
add-on, run the following command in your DDEV project directory:
ddev add-on get froboy/ddev-tsh
During installation, you will be asked to input your Teleport configuration:
teleport.example.com
)You can skip any if you don’t need them or don’t know them yet.
After installation, adjust any files for your project needs. Remove #ddev-generated
from any files that you edit, as they will be overwritten on the next ddev restart
.
As always, after install or modifying any config, run:
ddev restart
Command | Description |
---|---|
ddev tsh |
Passthrough for the tsh command |
ddev tsh-login |
Log in to a Teleport server and connect to a k8s cluster. |
If you are using drush aliases, you will want to set up a drush alias using kubectl
to connect to your Teleport cluster.
For example, in drush/sites/example.site.yml
:
my-site-k8s-dev:
kubectl:
namespace: "${env.CUSTOMER_NAME}-dev"
resource: 'deploy/${env.CUSTOMER_NAME}-dev'
container: 'php'
tty: true
interactive: true
paths:
drush-script: /path/to/project/vendor/bin/drush
uri: "https://k8s.${env.CUSTOMER_NAME}-dev.example.net/"
Please note that tty
and interactive
are set to true
to allow for interactive commands via tsh
in the container.