Code Monkey home page Code Monkey logo

kubepf's Introduction

kubepf: Handy port-forwarding tool for k8s

MIT License Go Report Release

kubepf is a simple utility for creating and managing port-forwarding in k8s. It's written in Go and uses Cobra for CLI.

Here is a kubepf demo: kubepf

Installation

go install -v github.com/alpkeskin/kubepf/cmd/kubepf@latest

Configuration

kubepf uses a config file named .kubepf in your home directory.

You can create it manually or use kubepf init command to create it. Here is an example config file:

# .kubepf config file. Edit it.
projects:
  - name: project1
    namespace: namespace1
    services:
      - name: service1
        local_port: 8081
        target_port: 8081
      - name: service2
        local_port: 8082
        target_port: 8082

  - name: project2
    namespace: namespace2
    services:
      - name: service3
        local_port: 8083
        target_port: 8083
      - name: service4
        local_port: 8084
        target_port: 8084

Usage

List projects and services in .kubepf config file

kubepf list

Start port-forwarding for project

kubepf <project_name>

List active port-forwarding

kubepf active

Kill port-forwarding for project

kubepf kill <project_name>

Kill port-forwarding for service

kubepf kill <service_name>

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

kubepf's People

Contributors

alpkeskin avatar

Stargazers

Yalçın Yağız KORKMAZ avatar Tarık avatar  avatar Çalgan Aygün avatar Hasanalp avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.