This message was deleted.
# k3s
a
This message was deleted.
c
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
a
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/
/var/run/k3s-data/:
data  lost+found

/var/run/k3s-data/data:
81710a58143cb0c5b20f2a31e88a85b3401f2d407649b5988eacbe3e3ba1a203  current

/var/run/k3s-data/data/81710a58143cb0c5b20f2a31e88a85b3401f2d407649b5988eacbe3e3ba1a203:
bin  etc

/var/run/k3s-data/data/81710a58143cb0c5b20f2a31e88a85b3401f2d407649b5988eacbe3e3ba1a203/bin:
'['         basename       chown                     cpio        df              ether-wake   fold             hdparm   
...
     
/var/run/k3s-data/data/81710a58143cb0c5b20f2a31e88a85b3401f2d407649b5988eacbe3e3ba1a203/etc:

/var/run/k3s-data/lost+found:
c
try putting --data-dir after server
generally not a great idea to mix flags before and after the command
a
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.
c
at the path I showed above
a
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
c
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.
a
Sure. I am good as I found the right way to make it work. Thanks a lot for the help!