Alvin Liu

  • Home
  • About
  • Privacy Policy
  1. Main page
  2. Linux
  3. Main content

Use Lens to connect Kubernetes through SSH Tunnel

2023-02-26 179hotness 0likes 0comments

Lens is a light weight client to manage remote Kubernetes cluster. It has Windows and Mac version to provide rich cluster management features. Following steps introduced how to use Lens connect to remote Kubernetes cluster through SSH tunnel.

  1. Download and install Lens https://k8slens.dev/
  2. Copy Kubernetes config file from remote server's ~/.kube/config to local machine's ~/.kube/config
  3. Modify local ~.kube/config file, change blod lines to use local tunnel
- cluster:
  server: https://localhost:6443
  insecure-skip-tls-verify: true
  name: kubernetes
  1. Use SSH tunnel to mapping remote server's 6443 port to local
  2. ssh user@rempte_server -p ssh_port -i id_rsa -L 6443:localhost:6443
  3. Launch Lens, connect to local cluster.
  1. Refer Lens document to manage the cluster https://docs.k8slens.dev/#lens-desktop

相关文章

  • Kubernetes 1.26 部署方案

  • Ubuntu 配置WordPress + LAMP

This article is licensed with Creative Commons Attribution-NonCommercial-No Derivatives 4.0 International License
Tag: Kubernetes Lens
Last updated:2023-02-26

Alvin Liu

Software Developer at Toronto

Like
< Last article
Next article >

Comments

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
Cancel

COPYRIGHT © 2023 Alvin Liu. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang