apisix-ingress-controller icon indicating copy to clipboard operation
apisix-ingress-controller copied to clipboard

kubectl plugin support

Open tokers opened this issue 5 years ago • 21 comments

Just like ingress-nginx:

https://github.com/kubernetes/ingress-nginx/blob/master/docs/kubectl-plugin.md.

tokers avatar Dec 09 '20 10:12 tokers

I can't get it , more detail about this?

masfbeca avatar Feb 06 '21 06:02 masfbeca

@masfbeca You can see https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/ for the details.

tokers avatar Feb 07 '21 01:02 tokers

@masfbeca You can see https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/ for the details.

looks interesting, pls assigned to me

masfbeca avatar Feb 07 '21 01:02 masfbeca

@masfbeca Assigned, feel free to ask any questions here :)

tokers avatar Feb 07 '21 05:02 tokers

Hi @tokers and @masfbeca , it seems that this issue has not been updated for over two months. If possible, I would love to contribute to this repo starting from addressing this issue (#73). Would it be okay for you?

fhuzero avatar Apr 18 '21 15:04 fhuzero

@fhuzero I will re-assign this issue for you.

tokers avatar Apr 19 '21 01:04 tokers

There are 2 commands (version and ingress) already implemented for apisix-ingress-controller. As for ingress-nginx kubectl plugin, 11 commands are available, such as backends and ingresses. Do I need to add support for all commands existing in ingress-nginx kubectl plugin? Or is there a list of commands to add support for?

fhuzero avatar Apr 19 '21 17:04 fhuzero

There are 2 commands (version and ingress) already implemented for apisix-ingress-controller. As for ingress-nginx kubectl plugin, 11 commands are available, such as backends and ingresses. Do I need to add support for all commands existing in ingress-nginx kubectl plugin? Or is there a list of commands to add support for?

I think we can add some vital ones firstly, we can add more and more gradually. Welcome to paste your proposal in this issue.

tokers avatar Apr 20 '21 01:04 tokers

we can first supports these:

  • kubectl apic route
  • kubectl apic route <ROUTE_NAME> service
  • kubectl apic route <ROUTE_NAME> service <SVC_NAME> upstream

sober-wang avatar Apr 30 '21 09:04 sober-wang

we can first supports these:

  • kubectl apic route
  • kubectl apic route <ROUTE_NAME> service
  • kubectl apic route <ROUTE_NAME> service <SVC_NAME> upstream

The semantic term apic is not so strong. what about ingress-apisix?

tokers avatar Apr 30 '21 09:04 tokers

we can first supports these:

  • kubectl apic route
  • kubectl apic route <ROUTE_NAME> service
  • kubectl apic route <ROUTE_NAME> service <SVC_NAME> upstream

The semantic term apic is not so strong. what about ingress-apisix?

I think apic means is apisix ingress controller abbreviation.

sober-wang avatar Apr 30 '21 09:04 sober-wang

we can first supports these:

  • kubectl apic route
  • kubectl apic route <ROUTE_NAME> service
  • kubectl apic route <ROUTE_NAME> service <SVC_NAME> upstream

The semantic term apic is not so strong. what about ingress-apisix?

I think apic means is apisix ingress controller abbreviation.

This abbreviation is not semantic

tokers avatar Apr 30 '21 09:04 tokers

we can first supports these:

  • kubectl apic route
  • kubectl apic route <ROUTE_NAME> service
  • kubectl apic route <ROUTE_NAME> service <SVC_NAME> upstream

Thanks for suggesting a list. I'll first add supports for those while determining a suitable abbreviation.

fhuzero avatar May 06 '21 06:05 fhuzero

Hi. All. I will create the apisix-ingress-controller plugins.

  • kubectl apisix-ingress-controller routes
  • kubectl apisix-ingress-controller routes <ROUTE_ID> upstreams

But I met a go version problem. Who can tall me the go version? 图片

Now . the apisix-ingress-controller is 1.13 in go.mod file. go_mod_version

sober-wang avatar Aug 26 '21 05:08 sober-wang

What's your Go version? io/fs was introduced in Go/1.16.

tokers avatar Aug 27 '21 03:08 tokers

What's your Go version? io/fs was introduced in Go/1.16.

my go.mod information's have some problem, I fixed it.

Now. Have a new question. Sometimes the apisix-ingress-controller used ingress and ApisixRoute information's registry to the ApiSix, it's failed. So I hope the helm charts config is default in the ApiSix admin kubernetes svc use nodePort , The Plugin will get Route's and Upstream's from Apisix, it not from kubernetes CRD.

sober-wang avatar Aug 27 '21 09:08 sober-wang

What's your Go version? io/fs was introduced in Go/1.16.

my go.mod information's have some problem, I fixed it.

Now. Have a new question. Sometimes the apisix-ingress-controller used ingress and ApisixRoute information's registry to the ApiSix, it's failed. So I hope the helm charts config is default in the ApiSix admin kubernetes svc use nodePort , The Plugin will get Route's and Upstream's from Apisix, it not from kubernetes CRD.

You may try to set up a tunnel to forward to port, then the service type won't be a problem.

tokers avatar Aug 30 '21 01:08 tokers

I don't know how to set up a tunnel to forward. used kubectl proxy ,you mean? I find the konnectivity service at kubernetes docs . but the service can only run in version after v1.19.0. Unfriendly.

sober-wang avatar Aug 30 '21 03:08 sober-wang

I don't know how to set up a tunnel to forward. used kubectl proxy ,you mean? I find the konnectivity service at kubernetes docs . but the service can only run in version after v1.19.0. Unfriendly.

Could you use the kubectl port-forward?

tokers avatar Aug 30 '21 13:08 tokers

Hi everyone , I used free time wrote it . Can you give me some suggest?

[root@k8smaster01 bin]#  kubectl apisix-ingress-controller routes -n ws 
ID		Name					Host			URI		Status	UpstreamId	CreateTime	UpdateTime
38e00c47	local.httpbin.org/*			local.httpbin.org	/*		1	5ce57b8e	1629860702	1629861940
4e49bfe9	ingress_myhttp.my.io_/dbsecurity	myhttp.my.io				1	1f735525	1629946426	1629978356
a3f6a593	my.kibana.io/kibana			my.kibana.io		/kibana		1	9481b55a	1629860702	1629861940
[root@k8smaster01 bin]# cd /tmp

You can git clone my fork. enter the cmd/plugin dir ./install-plugin.sh in your kubernetes master node. try it . : )

sober-wang avatar Aug 31 '21 15:08 sober-wang

Hi everyone , I used free time wrote it . Can you give me some suggest?

[root@k8smaster01 bin]#  kubectl apisix-ingress-controller routes -n ws 
ID		Name					Host			URI		Status	UpstreamId	CreateTime	UpdateTime
38e00c47	local.httpbin.org/*			local.httpbin.org	/*		1	5ce57b8e	1629860702	1629861940
4e49bfe9	ingress_myhttp.my.io_/dbsecurity	myhttp.my.io				1	1f735525	1629946426	1629978356
a3f6a593	my.kibana.io/kibana			my.kibana.io		/kibana		1	9481b55a	1629860702	1629861940
[root@k8smaster01 bin]# cd /tmp

You can git clone my fork. enter the cmd/plugin dir ./install-plugin.sh in your kubernetes master node. try it . : )

Can we have a mechanism to show the whole route?

tokers avatar Sep 01 '21 01:09 tokers