This message was deleted.
# k3s
This message was deleted.
1. the etcd server message indicates that there is an etcd server available for use by the apiserver. in this case it is kine/sqlite. 2. It’ll be there… are you sure you’re looking at the right place?
Copy code
/ # ls -la /var/lib/rancher/k3s/server/db/
total 8828
drwx------ 2 0 0    4096 Jan 25 01:14 .
drwx------ 8 0 0    4096 Jan 25 01:14 ..
-rw-r--r-- 1 0 0 3014656 Jan 25 01:14 state.db
-rw-r--r-- 1 0 0   32768 Jan 25 01:17 state.db-shm
-rw-r--r-- 1 0 0 5974032 Jan 25 01:17 state.db-wal
1. My guess too. Thanks for confirming! 2. I use this command to run the server:
k3s --data-dir /var/run/k3s-data/ server --disable-agent --disable-scheduler --disable-cloud-controller --disable-controller-manager --disable-kube-proxy --disable-network-policy --disable-helm-controller --disable coredns,servicelb,traefik,metrics-server
But in the /var/run/k3s-data, there is no 'db' dir:
Copy code
$ ls -R /var/run/k3s-data/
data  lost+found

81710a58143cb0c5b20f2a31e88a85b3401f2d407649b5988eacbe3e3ba1a203  current

bin  etc

'['         basename       chown                     cpio        df              ether-wake   fold             hdparm   

try putting --data-dir after server
generally not a great idea to mix flags before and after the command
Ah, my silly mistake. Sorry for that. But still wonder where the data goes earlier? I did not see the DB files in /var/lib/rancher/k3s either.
at the path I showed above
But my created resources did recover after I restart the server.
ls -la /var/lib/rancher/k3s/
ls: cannot access '/var/lib/rancher/k3s/': No such file or directory
I don’t know how you’ve set up your system, but it’s somewhere. honestly I would have expected the command you gave to work but for some reason you only have the data/bin dir and not the server and agent dirs that should be there next to it so I’m a little confused. poke around and see what you find.
Sure. I am good as I found the right way to make it work. Thanks a lot for the help!