Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: kubectl plugin #3755

Closed
alexkursell opened this issue Feb 11, 2019 · 7 comments · Fixed by #3779
Closed

Feature request: kubectl plugin #3755

alexkursell opened this issue Feb 11, 2019 · 7 comments · Fixed by #3779

Comments

@alexkursell
Copy link
Contributor

Now that #3686 is merged, we should do as @aledbf suggested and write a kubectl plugin to make debugging even easier.

Currently, here are the steps to inspecting some backend information:

  1. kubectl get pods -n <NAMESPACE> | grep ingress or similar to get a running pod
  2. kubectl exec -n <NAMESPACE> <POD NAME> -- /dbg backends list

By adding a kubectl plugin that takes care of finding and execing into the right pod, this could be reduced to something like:

kubectl nginx -n <NAMESPACE> backends list

Making a kubectl plugin would also allow us to do things like getting and diffing the configuration from multiple pods in a deployment, or maybe finding and printing ingress resource definitions for a given backend.

Some questions for discussion:

  1. Is this something worth doing?
  2. What features would be useful?
  3. Where would this live? Should it be in a subfolder or a separate repo?

cc: @ElvinEfendi, @aledbf

@aledbf
Copy link
Member

aledbf commented Feb 11, 2019

kubectl nginx -n <NAMESPACE> backends list

kubectl ingress-nginx -n <NAMESPACE> backends list :)

@alexkursell
Copy link
Contributor Author

kubectl nginx -n <NAMESPACE> backends list

kubectl ingress-nginx -n <NAMESPACE> backends list :)

True. Wouldn't want to annoy https://github.com/nginxinc/kubernetes-ingress :-)

@aledbf
Copy link
Member

aledbf commented Feb 11, 2019

  1. I think it is
  2. something like
kubectl ingress-nginx -n <NAMESPACE> info
    Service cluster IP address:
    LoadBalancer IP|CNAME:
    (print ingress table with additional information)
    NAME             HOSTS            ADDRESS           TLS     Path   Service  Service Port 
foo-bar          foo.bar          192.168.122.248       NO       /     foo-bar      8080
foo-bar-api      foo.bar          192.168.122.248       NO       /api  foo-bar      8080
  1. at least for now a subfolder inside the cmd directory

@aledbf
Copy link
Member

aledbf commented Feb 11, 2019

we should use https://github.com/GoogleContainerTools/krew to package the plugin

@aledbf
Copy link
Member

aledbf commented Feb 11, 2019

@alexkursell some time ago I wrote this https://gist.github.com/aledbf/db25dbc723fc7d71345a9657abfd766d as an idea for the cli/plugin
The detection of the cloud is one of the things it can help users with the initial configuration

@alexkursell
Copy link
Contributor Author

@alexkursell some time ago I wrote this https://gist.github.com/aledbf/db25dbc723fc7d71345a9657abfd766d as an idea for the cli/plugin
The detection of the cloud is one of the things it can help users with the initial configuration

That seems like a great set of features to add! Although how is the configuration different between cloud providers? I'd expect the configuration to be the same since it's all kubernetes.

@aledbf
Copy link
Member

aledbf commented Feb 13, 2019

Although how is the configuration different between cloud providers? I'd expect the configuration to be the same since it's all kubernetes.

In AWS you can choose between different load balancers, ELBs in L4/L7 or NLBs, also enabling proxy protocol or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants