K3s: How can I inspect the sqlite database directly?

Created on 18 Apr 2019  Â·  3Comments  Â·  Source: k3s-io/k3s

I'm interested in visualizing the transactions on the sqlite database, similar to what has been done with etcd in the past.
How can I inspect the sqlite db?
Thanks.

kinquestion

Most helpful comment

All 3 comments

Thanks for the fast response, I would like to know if there is a service/
address/ port in k3s that I could point the query.

P.S. - I really like k3s.

On Thu, Apr 18, 2019, 10:32 William Zhang notifications@github.com wrote:

Try this: https://sqlitebrowser.org/

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/rancher/k3s/issues/370#issuecomment-484321546, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABSRMG6J46V7NUNVGJPZN4LPQ7FSFANCNFSM4HGYMRNQ
.

 root@william î‚° /home/fedora î‚° ll /var/lib/rancher/k3s/server/db
total 4.9M
-rw-r--r-- 1 root root 852K Apr 18 05:40 state.db
-rw-r--r-- 1 root root  32K Apr 18 05:44 state.db-shm
-rw-r--r-- 1 root root 4.0M Apr 18 05:45 state.db-wal
 root@william î‚° /home/fedora î‚°

The default path for db files is: /var/lib/rancher/k3s/server/db, and it is defined in the source code:
https://github.com/rancher/k3s/blob/f6e0bad95300054ede990f7adc910f4de32ea923/vendor/github.com/ibuildthecloud/kvsql/clientv3/driver/sqlite/sqlite.go#L68

In contrast to many other database management systems, SQLite is not a client–server database engine.
So there are no service addresses:ports that provide external access like mysql, oracle, PostgreSQL.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wpwoodjr picture wpwoodjr  Â·  3Comments

ubergeek801 picture ubergeek801  Â·  3Comments

seanmalloy picture seanmalloy  Â·  3Comments

giezi picture giezi  Â·  3Comments

Moep90 picture Moep90  Â·  3Comments