<p>when I start telepresence(v0.104) to debug remote kubernetes(v1.15.2) pod:</p>

<pre><code>telepresence
</code></pre>

<p>when execute to this command:</p>

<pre><code>kubectl --context default --namespace dabai-fat port-forward telepresence-1582172593-3845718-23919-6d665f6cbc-9wvq5 51694:8022
</code></pre>

<p>it shows this error:</p>

<pre><code>Recent output was:
  error: error upgrading connection: Upgrade request required

Here are the last few lines of the logfile (see /Users/dolphin/.kube/telepresence.log for the complete logs):

   6.7 TEL | END SPAN remote.py:142(get_remote_info)    2.6s
   6.7 TEL | BEGIN SPAN connect.py:37(connect)
   6.7 TEL | [18] Launching kubectl logs: kubectl --context default --namespace dabai-fat logs -f telepresence-1582172593-3845718-23919-6d665f6cbc-9wvq5 --container telepresence-1582172593-3845718-23919 --tail=10
   6.7 TEL | [19] Launching kubectl port-forward: kubectl --context default --namespace dabai-fat port-forward telepresence-1582172593-3845718-23919-6d665f6cbc-9wvq5 51694:8022
   6.7 TEL | [20] Running: ssh -F /dev/null -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -q -p 51694 telepresence@127.0.0.1 /bin/true
   6.7 TEL | [20] exit 255 in 0.01 secs.
   7.0 TEL | [21] Running: ssh -F /dev/null -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -q -p 51694 telepresence@127.0.0.1 /bin/true
   7.0 TEL | [21] exit 255 in 0.01 secs.
   7.3  19 | error: error upgrading connection: Upgrade request required
   7.3 TEL | [19] kubectl port-forward: exit 1
   7.3 TEL | [22] Running: ssh -F /dev/null -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -q -p 51694 telepresence@127.0.0.1 /bin/true
   7.3 TEL | [22] exit 255 in 0.01 secs.
</code></pre>

<p>I think the key is the port forward failed.This is my nginx config:</p>

<pre><code>server{
    listen 443 ssl;

    ssl_certificate /etc/nginx/conf.d/cert/example.com/fullchain1.pem;
    ssl_certificate_key /etc/nginx/conf.d/cert/example.com/privkey1.pem;

    access_log /nginx-access.log;
    error_log /nginx-error.log;

    server_name k8s-ctl.example.com;

    location / {
        client_max_body_size 50m;
        proxy_redirect off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass https://172.19.104.231:8443;
        index index.html index.htm;
    }
}
</code></pre>

<p>where is the problem and what should I do to make it right?</p>

Dolphin
<p>If you using domain to access your cluster,try to change using <code>IP:PORT</code> to access the remote cluster,I change to this way fix error <code>upgrading connection: Upgrade request required</code>.The <code>~/.kube/config</code> like this:</p>

<pre><code>clusters:
- cluster:
    insecure-skip-tls-verify: true
    server: https://42.11.108.214:8443
  name: default
</code></pre>
