Mounting SSH configuration
This procedure describes how to mount custom SSH configurations into your workspaces. By creating and applying a ConfigMap, you can extend the default SSH settings with additional parameters or host-specific configurations. This ensures that your development environment maintains consistent connectivity to remote repositories and servers. Use this method to automate the propagation of SSH credentials and settings across multiple workspaces within your cluster.
|
The system sets the default SSH configuration automatically based on the |
To mount an SSH configuration file in a workspace, complete the following steps.
-
You are logged in to the cluster.
-
Create a new Kubernetes ConfigMap.
kind: ConfigMap apiVersion: v1 metadata: name: workspace-userdata-sshconfig-configmap namespace: <user_namespace> (1) labels: controller.devfile.io/mount-to-devworkspace: 'true' controller.devfile.io/watch-configmap: 'true' annotations: controller.devfile.io/mount-as: subpath controller.devfile.io/mount-path: /etc/ssh/ssh_config.d/ data: ssh-config.conf: <ssh config content> (2)1 A user namespace. Visit https://<che_fqdn>/api/kubernetes/namespaceto retrieve your Che user namespacename.2 The content of your SSH configuration file. -
Apply the ConfigMap.
$ kubectl apply -f - <<EOF <ConfigMap_prepared_in_step_1> EOF