Skip to content

exposing ssh port over traefik #292

Answered by norganos
norganos asked this question in Q&A
Discussion options

You must be logged in to vote

Fresh update: looks like I was able to achieve my goal... bear in mind, I've just got it running, so it's just a proof of concept!

1: add port 22 endpoint to traefik helm chart

added the following to the HelmChartConfig kube-system/traefik (omitting the irrelevant parts):

spec:
  valuesContent:
    ports:
      ssh:
        port: 22
        expose: true

2: create resources for a new nginx deployment acting as a man-in-the-middle whose only job is to consume the proxy protocol header:

apiVersion: v1
kind: ConfigMap
metadata:
  namespace: gitea
  name: gitea-ssh-adapter-config
data:
  startup.sh: |-
    #!/bin/sh
    backup="$UPSTREAM"
    export UPSTREAM="$(echo "$UPSTREAM" | envsubst)"
 …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by norganos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant