Skip to content

Port-forwarding in Lens Desktop Kube#

Lens Desktop Kube provides automatic port-forwarding, so there is no need to complete the steps described in Port forward from a Kubernetes pod.

If you have an application running in a pod of your LDK cluster, you can access it in your browser at http://localhost:<port-number>. Specify the port number in the nodePort field of the corresponding NodePort service. The following example sets the port to 30036, so you can open the application at http://localhost:30036.

apiVersion: v1
kind: Service
metadata:
  name: my-nodeport-service
spec:
  selector:
    app: my-app
  spec:
    type: NodePort
    ports:
    - name: http
      port: 80
      targetPort: 80
      nodePort: 30036
      protocol: TCP

Info

To create a new service, see Create resource from a template.