webkubectl icon indicating copy to clipboard operation
webkubectl copied to clipboard

how to use this with OpenShift

Open jainpratik163 opened this issue 3 years ago • 10 comments

we have many openshift clusters and we want to give this tool to people who wish to run some kubectl command from the backend how we can do this. we don't want to create a config file for all users. and how we can also implement security.

jainpratik163 avatar Aug 18 '22 08:08 jainpratik163

Hi Jain,

we have many openshift clusters and we want to give this tool to people who wish to run some kubectl command from the backend how we can do this

I think this is the best choice for you, see advantages You can do it like this. image

we don't want to create a config file for all users.

Not sure what you mean. Every user can manage his own config files in this tool and they are invisible to each others. But if you wish users to have different privileges, you have to create different ServiceAccount.

how we can also implement security.

Security is fully considered in webkubectl, like session isolation and basic authentication

liqiang-fit2cloud avatar Aug 19 '22 01:08 liqiang-fit2cloud

thanks, @liqiang-fit2cloud for the reply. in Openshift we use to get out own API tokens and with that token, we can also login from the backend, so in the same way, we can also login into this webkubectl ?

oc login --token= --server=<openshiftURL>

jainpratik163 avatar Aug 19 '22 07:08 jainpratik163

Never tried but I think the token and server of oc is valid to webkubectl. image But kubectl is only used with standard Kubernetes API and resources in OpenShift. See https://docs.openshift.com/container-platform/3.11/cli_reference/differences_oc_kubectl.html

liqiang-fit2cloud avatar Aug 19 '22 08:08 liqiang-fit2cloud

ok, I will try.

jainpratik163 avatar Aug 19 '22 08:08 jainpratik163

thanks, it is working fine with the token. and if we want to add oc client into the docker image we can add it?

jainpratik163 avatar Aug 19 '22 08:08 jainpratik163

you can try, I suppose it works fine.

liqiang-fit2cloud avatar Aug 19 '22 09:08 liqiang-fit2cloud

i tried to create new docker images with oc client add but getting the below error anything extra we also need to do ?

bash-5.1# which oc /usr/bin/oc bash-5.1# ls -lrt /usr/bin/oc -rwxrwxrwx 1 root root 72461736 Aug 23 05:05 /usr/bin/oc bash-5.1# oc bash: /usr/bin/oc: No such file or directory bash-5.1#

jainpratik163 avatar Aug 23 '22 06:08 jainpratik163

Seems oc cli requires glibc, you have to change base image. https://github.com/openshift/origin/issues/11135

liqiang-fit2cloud avatar Aug 23 '22 06:08 liqiang-fit2cloud

i will try this but can we also include this oc client in same docker Image?

jainpratik163 avatar Aug 23 '22 07:08 jainpratik163

Sorry we have no plan to support oc cli.

liqiang-fit2cloud avatar Aug 23 '22 08:08 liqiang-fit2cloud