pixel-point / kube-forwarder

Easy to use Kubernetes port forwarding manager

Home Page:https://kube-forwarder.pixelpoint.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example config/json and some documentation on how to set up Port forwarding for a service

syedalisait opened this issue · comments

There is no documentation or an example that I can look up to configure port-forwarding for a service.

So my assumption was it should be straight forward after opening the application, but it isn't.
I loaded the ~/.kube/config file and named the cluster and filled few more fields. But still wasn't able to configure.

Thank you for the message @syedalisait. First of all, check out our latest version v1.1.0 that contains auto detection of kube config and also several improvements related with parsing multi-contexts configuration. I hope it will make the process of using the app better.

Below a few examples of kube config which are pretty standard, I think
Digital Ocean:

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSU
    server: https://a7451be2-44ab-42bd-9d4c-213dadf0e675.k8s.ondigitalocean.com
  name: do-fra1-k8s-1-14-1-do-4-fra1-1561886718185
contexts:
- context:
    cluster: do-fra1-k8s-1-14-1-do-4-fra1-1561886718185
    user: do-fra1-k8s-1-14-1-do-4-fra1-1561886718185-admin
  name: do-fra1-k8s-1-14-1-do-4-fra1-1561886718185
current-context: do-fra1-k8s-1-14-1-do-4-fra1-1561886718185
kind: Config
preferences: {}
users:
- name: do-fra1-k8s-1-14-1-do-4-fra1-1561886718185-admin
  user:
    client-certificate-data: LS0tLS1CRUdJTiBDRVJUSU
    client-key-data: LS0tLS1CRUdJTiBSU0Eg

Rancher

apiVersion: v1
kind: Config
clusters:
- name: "pixel-point"
  cluster:
    server: "https://rancher.example.com/k8s/clusters/c-rz2xs"

users:
- name: "user-jzlgj"
  user:
    token: "kzgw6sz66qjkfzn7js6sz7p27t8k"

contexts:
- name: "pixel-point"
  context:
    user: "user-jwegj"
    cluster: "pixel-point"

current-context: "pixel-point"

If your existing config still does not work, please post it here and remove some confidential information from it, and we will try to understand the reason of the problem.

I think that OP mean https://kubernetes.io/docs/concepts/services-networking/service/ .
This would be useful to support not only port-forwarding to pods/deployments, but also to services.

@Adiqq Thanks for that.
Yes I'm looking to port-forward a Service