farmotive / kpoof Goto Github PK
View Code? Open in Web Editor NEWQuick k8s port-forward utility
Home Page: https://github.com/farmotive/kpoof
License: MIT License
Quick k8s port-forward utility
Home Page: https://github.com/farmotive/kpoof
License: MIT License
I can see random connection issues with kpood daemon on my local kuber cluster, without any reasons.. it just stops working so i need to restart it.
any ideas how can i troubleshoot this?
Given container foo
with PORT: 8080/TCP
and container bar
with PORT: 11211/TCP
kpoof
will show the final prompt as Note: *nix ports below 1000 are denied, i.e., use '8080' if the pod is exposing 80 or 443. Local port number? (defaults to 808011211):
Expected result: default to 8080
Hi,
nice project - works even on Windows 10 Using Windows-Subsystem Linux with Ubuntu from Windows store :)
When working with different clusters (i.e. context) it would be really helpful if kpoof would show the current context (kubectl config get current-context
) and it would be nice beeing able event to switch context (kubectl config view -o jsonpath='{.contexts[*].name}'
).
Best regards and thanks for the great work
Andreas
I had this feature in place, but the API choked on it. Will need to revisit, so that someone can use 8080:8081
, for example, if the local :8080
is currently bound.
Hi,
it would be great if one could provide Namespace, Pod-Number and Container-Number (and context, if #16 gets implemented) via command line, like kpoof my-namespace 1 2
. This would allow to create some shortcuts for frequently used pods.
Best regards
Andreas
We need the ability to run kpoof as a daemon for support and developer setup tools
Need to refactor po_port_sniff
to parse multiple exposed ports and serve the result as a list for prompt input, defaulting to first exposed port.
Tests file should include:
Unrelated to #10 - this problem exists in the current 2.0.2 release:
$ kpoof -p
Namespace? (default foo):
1 foo
2 bar
3 baz
4 default
5 kube-public
6 kube-system
1
Pod number? (default 1):
1 foo-drupal-758dfdd65b-bdn8h
2 foo-mariadb-9f654549d-xk5rn
Remote port number? (default 1):
1 443
2 80
2
Local port number? (defaults to 80):
Forwarding from 127.0.0.1:50080 -> 2
Forwarding from [::1]:50080 -> 2
Handling connection for 50080
Handling connection for 50080
E0507 10:23:42.880137 63306 portforward.go:331] an error occurred forwarding 50080 -> 2: error forwarding port 2 to pod cd0d5370129de33e996974d349dd0c27cbf37817911a0b5a4dbbf59a8a7c5037, uid : exit status 1: 2018/05/07 14:23:42 socat[6233] E connect(5, AF=2 127.0.0.1:2, 16): Connection refused
E0507 10:23:42.899045 63306 portforward.go:331] an error occurred forwarding 50080 -> 2: error forwarding port 2 to pod cd0d5370129de33e996974d349dd0c27cbf37817911a0b5a4dbbf59a8a7c5037, uid : exit status 1: 2018/05/07 14:23:42 socat[6232] E connect(5, AF=2 127.0.0.1:2, 16): Connection refused
Handling connection for 50080
There is also now an additional regression in master
from #10 that now needs to be fixed for the --port
option to even fail as it does above. This new problem is just that the CMD
needs to be created as and passed as an array. However, once this is fixed, the above existing issue prevents -p
from working.
First of all, kpoof
is working in primitive form. Woot!
But only for current namespace, and only with the existing port.
Steps to reproduce:
On the farmotive
cluster, kns
to a namespace with a mysql or mariadb pod. 365bass
or basekamp
are good options. Run ./kpoof
using enter
at the namespace selection, and the correct pod number (2 in both examples). You will have a port-forward instantiated at 3306.
Now ./kpoof
again, this time selecting the other namespace.
Expected Result: A successful Port forward.
Actual Result: Pod (Resource) not found => error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.