<p>I've installed gitlab on my Linode Kubernetes Cluster and the UI works properly. But I can't  clone / push any repository because ssh access fails.</p>
<pre><code>git clone ssh://git@gitlab.example.com:6022/v2o/prova.git
Clone in 'prova' in corso...
git@example.com: Permission denied (publickey,password).
</code></pre>
<p>I've created the SSH Key pair and I've added the public one on Gitlab but nothing.</p>
<p>I've read some suggestions from internet and I tried to run <code>ssh -Tv ssh://git@gitlab.example.com:6022</code></p>
<pre><code>debug1: Will attempt key: /Users/v20/.ssh/id_ed25519 ED25519 SHA256:1246872361472618746238bdhahdahsdhjfa explicit
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=&lt;ssh-ed25519,ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521&gt;
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: /Users/v2o/.ssh/id_ed25519 ED25519 SHA256:5fTy/hjLhfZ7xvLQmkxxjdddMNFiIV7auC2/U7nxsEo explicit
debug1: Authentications that can continue: publickey,password
debug1: No more authentication methods to try.
git@gitlab.example.com: Permission denied (publickey,password).
</code></pre>
<p>It pick up the correct key (/Users/v20/.ssh/id_ed25519) but looks like it can't connect anyway.</p>
<p><strong>NOTE 1</strong> I've used a NodeBalancer which expose 6022:22 port - I don't know if this configuration is correct but it's UP on Linode so I guess so</p>
<p><strong>NOTE 2</strong> If I exec on runner task pod, I get an unknown version of git, redis and go. While it is fine with GO, I don't know with git/redis.</p>
<pre><code>git@gitlab-task-runner-7869d8d675-k4s4l:/$ gitlab-rake gitlab:env:info

System information
System:
Current User:   git
Using RVM:      no
Ruby Version:   2.6.6p146
Gem Version:    2.7.10
Bundler Version:1.17.3
Rake Version:   12.3.3
Redis Version:  unknown
Git Version:    unknown
Sidekiq Version:5.2.9
Go Version:     unknown

GitLab information
Version:        13.5.3
Revision:
Directory:      /srv/gitlab
DB Adapter:     PostgreSQL
DB Version:     13.0
URL:            https://gitlab.example.com
HTTP Clone URL: https://gitlab.example.com/some-group/some-project.git
SSH Clone URL:  git@gitlab.example.com:some-group/some-project.git
Using LDAP:     no
Using Omniauth: no

GitLab Shell
Version:        13.11.0
Repository storage paths:
- default:      /var/opt/gitlab/repo
GitLab Shell path:              /home/git/gitlab-shell
Git:            /usr/bin/git
</code></pre>
<p><strong>NOTE 3</strong> the git path on the message above is wrong, that might be a problem, but I don't know how to change it :/</p>

v2to
<p>I managed to solve this problem.</p>
<ol>
<li>I needed to specify in the GitLab configuration (values.yaml) the shell will be expose on an high port 3xxxx so I added this part:</li>
</ol>
<pre><code>  gitlab-shell:
    enabled: true
    minReplicas: 1
    maxReplicas: 1
    # Map gitlab-shell to a high-numbered NodePort to support cloning over SSH
    service:
      type: NodePort
      nodePort: 32022
</code></pre>
<ol start="2">
<li><p>Then I needed to set another variable (in the same file) <code>global.shell.port = 22</code>.</p>
</li>
<li><p>The Node balancer needed to be on port 22 -&gt; 32022</p>
</li>
</ol>
<p>… and finally it worked like a charm!</p>
