-
Notifications
You must be signed in to change notification settings - Fork 772
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
Access dqlite #4243
Comments
Hi @xl204431 To get a raw sqlite shell you can use the following command: /snap/microk8s/current/bin/dqlite \
--cert /var/snap/microk8s/current/var/kubernetes/backend/cluster.crt \
--key /var/snap/microk8s/current/var/kubernetes/backend/cluster.key \
--servers file:////var/snap/microk8s/current/var/kubernetes/backend/cluster.yaml \
k8s To retrieve a snapshot of the database (current status of all keys/values), you might the following command to be useful: microk8s dbctl --debug backup This will print all current database keys and create a tarball that you can inspect. Hope this helps |
It would also help if you share some details about what is the issue that are you experiencing. Thanks again! |
@neoaggelos IssueI can view the pod when get namespace
But I can not get, describe or delete this problem pod
So, this problem-pod keeps its data and affect velero node-agent ReproduceHave no idea how it happened Try to debugI use I tried
It connected, but I want to inspect what tables are in the db for further check, however, the command turns out to be error
I try to learn k8s-dqlite's code, and only find migrator without any other tools to use. I don't know how to solve this issue and need your help. |
Hi @xl204431, sorry for missing this One way to observe the current state of the datastore is to use:
Example output from an empty cluster:
The debug output shows the index of each key in the datastore. You can then inspect the tarball to check the Hope this helps |
@neoaggelos |
Hi @xl204431 I imagine this is using the internal protobufs found on the Kubernetes project, so I am not sure if I can help more in this direction. The type definition would be https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/api/core/v1/types.go#L4333 I am not aware of any tooling to directly inspect the data. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Background
a pod can be get under namespace, and the status stick as "Terminating"
but when
get
by name,describe
ordelete
this pod , it shows that the pod can not be found.Error from server (NotFound): pods "XXX" not found
Support need
I guess the data is corrupted and want to investigate dqlite's data.
How can I access dqlite?
The text was updated successfully, but these errors were encountered: