Skip to content

krunkit vm data lost on restart #1583

@acelinkio

Description

@acelinkio

Description

On colima restart or a literal system restart, colima looses state when using krunkit type.

Version

had this issue in both
0.10.1
0.10.3

Operating System

  • macOS Intel <= 13 (Ventura)
  • macOS Intel >= 14 (Sonoma)
  • Apple Silicon <= 13 (Ventura)
  • Apple Silicon >= 14 (Sonoma)
  • Linux

Output of colima status

🍎 ❯ ./colima-Darwin-arm64 status -p localdev
INFO[0000] colima [profile=localdev] is running using Krunkit 
INFO[0000] arch: aarch64                                
INFO[0000] runtime: containerd                          
INFO[0000] mountType: sshfs                             
INFO[0000] address: 192.168.106.2                       
INFO[0000] containerd socket: unix:///Users/ep/.colima/localdev/containerd.sock 
INFO[0000] buildkitd socket: unix:///Users/ep/.colima/localdev/buildkitd.sock 
INFO[0000] kubernetes: enabled

Reproduction Steps

  1. colima start -p localdev
  2. colima restart -p localdev
  3. kubectl get nodes -A
    Unable to connect to the server: tls: failed to verify certificate: x509: certificate signed by unknown authority
🍎 ❯ ./colima start -p localdev

🍎 ❯ kubectl get pods -A
No resources found

🍎 ❯ kubectl get nodes -A  
NAME              STATUS   ROLES           AGE    VERSION
colima-localdev   Ready    control-plane   3m1s   v1.35.3+k3s1

🍎 ❯ ./colima restart -p localdev
INFO[0000] stopping colima [profile=localdev]           
INFO[0000] stopping ...                                  context=kubernetes
INFO[0002] stopping ...                                  context=containerd
INFO[0003] stopping ...                                  context=vm
INFO[0005] done                                         
INFO[0008] starting colima [profile=localdev]           
INFO[0008] runtime: containerd+k3s                      
INFO[0008] preparing network ...                         context=vm
INFO[0010] starting ...                                  context=vm
INFO[0016] provisioning ...                              context=containerd
INFO[0016] starting ...                                  context=containerd
INFO[0016] provisioning ...                              context=kubernetes
INFO[0017] starting ...                                  context=kubernetes
INFO[0022] done                                         

🍎 ❯ kubectl get nodes -A                     
Unable to connect to the server: tls: failed to verify certificate: x509: certificate signed by unknown authority

🍎 ❯ ./colima ssh -p localdev    
ep@colima-localdev:~$ kubectl get nodes -A
NAME              STATUS   ROLES           AGE   VERSION
colima-localdev   Ready    control-plane   43s   v1.35.3+k3s1

colima.yaml

cpu: 4
disk: 80
kubernetes:
  enabled: true
  k3sArgs:
  - --disable=coredns,flannel,local-storage,metrics-server,servicelb,traefik
  - --flannel-backend='none'
  - --disable-network-policy
  - --disable-cloud-controller
  - --disable-kube-proxy
  - --node-ip=192.168.106.2
  port: 6443
  version: v1.35.3+k3s1
memory: 12
network:
  address: true
  mode: shared
runtime: containerd
vmType: krunkit

Expected behaviour

Colima does not lose state

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions