Code Monkey home page Code Monkey logo

kubectl-multiforward's Introduction

Hello

I'm Nikhil Nygaard and I like being productive with JavaScript and Go. I'd like to spend time learning Haskell and Rust, but I haven't found the right thing to work on yet.

You can find a few of my linked identities on Keybase.

I also exist on LinkedIn.

kubectl-multiforward's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kubectl-multiforward's Issues

Documentation for this tool

Hi, I need to understand how this tool works, is ther any documentation or tutrial to understand the tool? Thanks

~/.kube for location of multiforward.yaml

It is a common pattern for kubectl tools to also use the ~/.kube directory for storing their configuration, e.g. https://github.com/simontheleg/konf-go

Would it seem useful to also add ~/.kube/multiforward.yaml to the list of search paths?

viper.SetConfigName(".multiforward")
viper.SetConfigType("yaml")
viper.AddConfigPath("$HOME")
viper.AddConfigPath(".")

Eventually it would be enough to add this below or above here?

	viper.AddConfigPath("$HOME/.kube")

Then I'd also be happy to continue using .multiforward.yaml, for not having to maintain two different names for the file.

Support for forwardings to pods and deployments

Some port-forwards are set up to directly reach pods or deployments.

It could be nice to support those cases as well.

krew registry installs old version of the plugin?

➜ k krew install multiforward
...
➜ k multiforward prod                                             
remote port must be > 0
remote port must be > 0
remote port must be > 0

my config file:

➜ cat .multiforward.yaml                                                   
# https://github.com/njnygaard/kubectl-multiforward/blob/master/.multiforward.example.yaml
# https://github.com/njnygaard/kubectl-multiforward
groups:
  - name: prod
    services:
      - displayName: prometheus
        localPort: 9090
        servicePort: 9090
        namespace: prometheus
        name: prometheus-prometheus
        protocol: http
      - displayName: grafana
        localPort: 8080
        servicePort: 80
        namespace: grafana
        name: grafana
        protocol: http
      - displayName: argocd
        localPort: 7070
        servicePort: 80
        namespace: argo-cd
        name: argo-cd-argocd-server
        protocol: http

invalid configuration

With the file ~/.multiforward.yaml as:

groups:
  - name: next
    services:
      - displayName: Alertmanager
        port: 9093
        namespace: kube-prometheus-stack
        name: alertmanager-operated
        protocol: http
      - displayName: Prometheus
        port: 9090
        namespace: kube-prometheus-stack
        name: prometheus-operated
        protocol: http
      - displayName: Grafana
        port: 3000
        namespace: kube-prometheus-stack
        name: kube-prometheus-stack-grafana
        protocol: http
      - displayName: Argo CD
        port: 443
        namespace: argocd
        name: argocd-server
        protocol: http

      # This needs a deployment of Hubble UI and associated ClusterIP service
      # - displayName: Hubble
      #   port: 9200
      #   namespace: cilium
      #   name: 
      #   protocol: https

      # This needs a separate internal ClusterIP Service
      # In https://doc.traefik.io/traefik/getting-started/install-traefik/#exposing-the-traefik-dashboard
      # they use an IngressRoute, which is by default not secure, and cannot be forwarded here
      # - displayName: Traefik
      #   port: 9000
      #   namespace: traefik
      #   name: traefik

and having this installed through kubectl krew install multiforward, we get the error:

invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable

while access to the cluster is working as expected:

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.7", GitCommit:"b56e432f2191419647a6a13b9f5867801850f969", GitTreeState:"archive", BuildDate:"2022-03-01T00:00:00Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.9", GitCommit:"c1de2d70269039fe55efb98e737d9a29f9155246", GitTreeState:"clean", BuildDate:"2022-07-13T14:19:57Z", GoVersion:"go1.17.11", Compiler:"gc", Platform:"linux/amd64"}

How could I possibly debug this?


The commented parts in the YAML manifest are related to:

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.