{"id":37118595,"url":"https://github.com/errordeveloper/go-k8s-portforward","last_synced_at":"2026-01-14T13:51:07.641Z","repository":{"id":57542106,"uuid":"292620960","full_name":"errordeveloper/go-k8s-portforward","owner":"errordeveloper","description":"Go portforwarding library for Kubernetes","archived":false,"fork":true,"pushed_at":"2020-09-03T16:44:24.000Z","size":27835,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T01:55:58.318Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"oliviabarrick/go-k8s-portforward","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/errordeveloper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-03T16:19:20.000Z","updated_at":"2020-09-03T16:44:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/errordeveloper/go-k8s-portforward","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/errordeveloper/go-k8s-portforward","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/errordeveloper%2Fgo-k8s-portforward","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/errordeveloper%2Fgo-k8s-portforward/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/errordeveloper%2Fgo-k8s-portforward/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/errordeveloper%2Fgo-k8s-portforward/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/errordeveloper","download_url":"https://codeload.github.com/errordeveloper/go-k8s-portforward/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/errordeveloper%2Fgo-k8s-portforward/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28422356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T13:51:06.860Z","updated_at":"2026-01-14T13:51:07.632Z","avatar_url":"https://github.com/errordeveloper.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"A Go library for creating port forwards into pods running in a Kubernetes cluster.\n\n![build status](https://ci.codesink.net/api/badges/justinbarrick/go-k8s-portforward/status.svg)\n\nThis code is heavily inspired by the implementations in kubectl, fission, and helm:\n\n* https://github.com/kubernetes/helm/blob/master/pkg/kube/tunnel.go\n* https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/portforward.go\n* https://github.com/fission/fission/blob/master/fission/portforward/portforward.go\n\nSee [godoc.org](https://godoc.org/github.com/justinbarrick/go-k8s-portforward) for full documentation.\n\n# Example\n\nA minimal example which will forward to the \n\n```\npackage main\n\nimport (\n\t\"log\"\n\t\"time\"\n\t\"github.com/justinbarrick/go-k8s-portforward\"\n\tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n)\n\nfunc main() {\n\tpf, err := portforward.NewPortForwarder(\"default\", metav1.LabelSelector{\n\t\tMatchLabels: map[string]string{\n\t\t\t\"app\": \"nginx\",\n\t\t},\n\t}, 80)\n\tif err != nil {\n\t\tlog.Fatal(\"Error setting up port forwarder: \", err)\n\t}\n\n\terr = pf.Start()\n\tif err != nil {\n\t\tlog.Fatal(\"Error starting port forward: \", err)\n\t}\n\n\tlog.Printf(\"Started tunnel on %d\\n\", pf.ListenPort)\n\ttime.Sleep(60 * time.Second)\n}\n```\n\nAlso see `cmd/main.go`.\n\n# Kubeconfig\n\nBy default, it will load a Kubernetes configuration file from ~/.kube/config or $KUBECONFIG.\n\nIt is possible to provide your own Kubernetes client by instantiating the PortForward struct\ndirectly instead of calling the `NewPortForwarder` method.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferrordeveloper%2Fgo-k8s-portforward","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferrordeveloper%2Fgo-k8s-portforward","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferrordeveloper%2Fgo-k8s-portforward/lists"}