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

kubectl plugin to query openebs component status #2946

Closed
kmova opened this issue Feb 29, 2020 · 16 comments
Closed

kubectl plugin to query openebs component status #2946

kmova opened this issue Feb 29, 2020 · 16 comments
Milestone

Comments

@kmova
Copy link
Member

kmova commented Feb 29, 2020

OpenEBS is completely Kubernetes native and is implemented using microservices. The microservices are deployed as Kubernetes deployments, statefulset or daemon sets and so forth.

In order to know the status of the components, a user has to run multiple kubectl commands to check that all the OpenEBS related microservices are up and running.

For instance, a cStor volume comprises of one or more cStor Pool Deployments and a cStor Target Deployment. To know the status of a cStor volume, the user is expected to run the following kubectl commands:

  • kubectl get cstorvolume -n openebs (check for the status of the volume and if not-healthy, check for the replica and target status.
  • kubectl get pods -n openebs to check if the replica and target pods are running
  • kubectl get csp -n openebs and kubectl get cvr -n openebs for checking if the replica has any additional issues, if the node that was running a csp might be down and so forth.

The proposal is to provide a kubectl plugin for openebs that will allow running simple CLI commands that can perform required kubectl queries and present the information in an easy-to-consume manner.

Using kubectl plugin, it would be great if a user can type a command like:

kubectl openebs volume-status --name <cstor-pv-name>

The output for this command could be something like:

Volume Status
----------------
Name              :   pvc-dc3cb979-51ec-11e9-803f-42010a800179
PVC Name          :   cstor-volume
Capacity          :   8G
Used              :   5G
Target Status     :   Running
Target Node       :   node2
Replica Count     :   3

Replica Details :
-----------------
NAME          STATUS      POOL NAME           NODE    POOL CAPACITY
----          ------      ---------           -----   -------------
replica-1     Running     cstor-pool-ejs2     node1   50%
replica-2     Running     cstor-pool-gf1d     node2   80% 
replica-3     Running     cstor-pool-m8cy     node3   60%


Application Pods using the Volume
----------------------------------
NAME          STATUS      NODE 
----          ------      -----
demo-app      Running     node1

Similarly, there can be many other CLI options like:

kubectl openebs cstor-status --name <cstor-pool-cluster-name>
kubectl openebs status
kubectl openebs upgrade volume --name <cstor-volume-name> --to-verstion <new-version>

@Raman-Kumar
Copy link

@kmova
Can you suggest me some docs or resources to properly understand
the codebase of openebs and contributing to it?

@kmova
Copy link
Member Author

kmova commented Mar 4, 2020

Hi @Raman-Kumar -- this is a good place to start:
https://github.com/openebs/openebs/tree/master/contribute/design

There is some amount of code to fetch above details in the form of mayactl here:
https://github.com/openebs/maya/tree/master/cmd/mayactl

Also a lot of dev hangs out on the Kubernetes slack #openebs channel.

@tetsuya28
Copy link

@kmova
Hi, I'm interested in this issue for GSoC'20.
I have some questions.

  • Is this goal is to make the kubectl openebs command with options such as volume-status, cstor-status, etc ?
  • What should I do next?

@kmova
Copy link
Member Author

kmova commented Mar 5, 2020

Hi @tetsuya28, Thanks for the interest!

Yes you are right. The goal is to have kubectl openebs with command options. As a first step, it might be helpful to get openebs running in a kubernetes cluster and go through the current CLI provided here: https://docs.openebs.io/docs/next/mayactl.html

Post that a proposal can be raised here: https://github.com/openebs/openebs/tree/master/contribute/design/1.x with the suggested options to be added. We could also start with a google doc proposal and discuss that over the slack before raising the PR.

Feel free to reach out on the Kubernetes slack openebs channel.

@tetsuya28
Copy link

@kmova
Thanks, I will text you on slack.

@championshuttler
Copy link

Hey @kmova ! I am willing to get mentored for this issue for the Community Bridge program. Can you please help me in getting started with it?

Thanks

@kmova
Copy link
Member Author

kmova commented May 13, 2020

@championshuttler -- can you please apply through the community bridge program, providing some background details and draft proposal.

vaniisgh added a commit to vaniisgh/openebs that referenced this issue May 13, 2020
A draft proposal to tackle openebs#2946

Signed-off-by: Vani Singh <vanisingh@live.co.uk>
@github-actions
Copy link

Issues go stale after 90d of inactivity.

@kmova
Copy link
Member Author

kmova commented Feb 2, 2021

As part of the 2020 Community Bridge program, there was progress made to providing initial repo for https://github.com/openebs/openebsctl.

This issue is being opened up again for the 2021 spring mentorship program to build this functionality.

@wjayesh
Copy link

wjayesh commented Feb 5, 2021

Hi @kmova! I'm interested in taking this up. I will refer to the documents linked above and get back to you with questions/ideas on slack?

@renhuanyu
Copy link

sign up

@github-actions
Copy link

Issues go stale after 90d of inactivity.

@kmova
Copy link
Member Author

kmova commented May 18, 2021

This is an epic issue with ongoing implementation tracked at https://github.com/openebs/openebsctl

@kmova kmova added this to the 3.0 milestone May 18, 2021
@github-actions
Copy link

Issues go stale after 90d of inactivity. Please comment or re-open the issue if you are still interested in getting this issue fixed.

@vharsh
Copy link
Member

vharsh commented Aug 18, 2021

More information on this issue is listed on issues @ openebs/openebsctl#36 & openebs/openebsctl#83

@kmova
Copy link
Member Author

kmova commented Aug 21, 2021

With release 2.12.0, kubectl openebs ... has a lot of functionality to help with jiva, cstor and zfs local pv volumes. For more information checkout: https://github.com/openebs/openebsctl

@kmova kmova closed this as completed Aug 21, 2021
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

No branches or pull requests

8 participants