{"id":20972598,"url":"https://github.com/vbem/k8s-port-forward","last_synced_at":"2025-09-07T17:43:40.575Z","repository":{"id":65162189,"uuid":"479920190","full_name":"vbem/k8s-port-forward","owner":"vbem","description":"An action forward local ports to workloads in Kubernetes.","archived":false,"fork":false,"pushed_at":"2023-10-21T07:02:56.000Z","size":19,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-02T18:54:48.499Z","etag":null,"topics":["actions","daemon","k8s","kubectl","kubernetes","port-forward","workload"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/kubernetes-port-forward","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vbem.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":".github/CODEOWNERS","security":null,"support":null,"governance":null}},"created_at":"2022-04-10T05:16:26.000Z","updated_at":"2024-03-03T12:27:55.000Z","dependencies_parsed_at":"2023-02-17T16:30:31.971Z","dependency_job_id":"121a20f7-69c4-4352-b6d8-7b86120a951b","html_url":"https://github.com/vbem/k8s-port-forward","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbem%2Fk8s-port-forward","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbem%2Fk8s-port-forward/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbem%2Fk8s-port-forward/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbem%2Fk8s-port-forward/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vbem","download_url":"https://codeload.github.com/vbem/k8s-port-forward/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254132004,"owners_count":22020060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["actions","daemon","k8s","kubectl","kubernetes","port-forward","workload"],"created_at":"2024-11-19T04:08:56.634Z","updated_at":"2025-05-14T11:34:13.125Z","avatar_url":"https://github.com/vbem.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# k8s-port-forward\n[![Testing](https://github.com/vbem/k8s-port-forward/actions/workflows/test.yml/badge.svg)](https://github.com/vbem/k8s-port-forward/actions/workflows/test.yml)\n[![Super Linter](https://github.com/vbem/k8s-port-forward/actions/workflows/linter.yml/badge.svg)](https://github.com/vbem/k8s-port-forward/actions/workflows/linter.yml)\n[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/vbem/k8s-port-forward?label=Release\u0026logo=github)](https://github.com/vbem/k8s-port-forward/releases)\n[![Marketplace](https://img.shields.io/badge/GitHub%20Actions-Marketplace-blue?logo=github)](https://github.com/marketplace/actions/kubernetes-port-forward)\n\n## About\n\nThis action can be used to [forward](https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/) local ports on GitHub runners to workloads in your Kubernetes cluster.\n\nCurrent implementation is to setup a `kubectl port-forward` daemon in background and immune to hangups, which make local ports on runner available to subsequent steps.\n\nNote that this action follow [official *kubeconfig* authentication methods](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) and you need to sign in your K8s cluster via other actions such as [kubeconfig4sa](https://github.com/marketplace/actions/kubeconfig-for-service-account-sa), or manually set `KUBECONFIG` environment variable for this action in your workflows file.\n\n\n## Example usage\n\n```yaml\n- name: Setup KUBECONFIG\n  uses: vbem/kubeconfig4sa@v1\n  with:\n    server:     https://your-kubeapi-server:6443\n    ca-base64:  ${{ secrets.K8S_CA_BASE64 }}\n    token:      ${{ secrets.K8S_SA_TOKEN }}\n    namespace:  my-namespace\n\n# This action will forward port 8080 on runner to port 80 of your service in Kubernetes!\n- name: Setup Kubernetes port-forward daemon\n  uses: vbem/k8s-port-forward@v1\n  with:\n    workload: 'svc/mysvc'\n\n- name: Request a service in Kubernetes\n  run: curl localhost:8080\n```\n\n![Example](https://repository-images.githubusercontent.com/479920190/ce3b08cc-302b-481e-8447-5f060270d3f5)\n\n## Inputs\n\nID | Type | Default | Description\n--- | --- | --- | ---\n`workload` | String | *Required input* | Kubernetes workload `type/name` such as `deploy/mydeploy`, `svc/mysvc` or `po/mypod`\n`mappings` | String  | `8080:80` | Ports mappings `[LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N]`\n`options` | String | `\u003cempty\u003e` | Other command-line options, such as `--namespace=myns`\n`sleep` | String | `3` | Seconds to wait before action finished\n\n## Outputs\n\nID | Type | Description\n--- | --- | ---\n`pid` | String | Process ID of port-forward daemon\n`log` | String | Path to port-forward log file","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvbem%2Fk8s-port-forward","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvbem%2Fk8s-port-forward","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvbem%2Fk8s-port-forward/lists"}