crc-org / crc

CRC is a tool to help you run containers. It manages a local OpenShift 4.x cluster, Microshift or a Podman VM optimized for testing and development purposes
https://crc.dev
Apache License 2.0
1.23k stars 233 forks source link

[BUG] Can't create K8S clusters with kind on the podman preset #3491

Open jeffmaury opened 1 year ago

jeffmaury commented 1 year ago

General information

CRC version

CRC version: 2.13.1+b5b864fd
OpenShift version: 4.12.0
Podman version: 4.3.1

CRC status

DEBU CRC version: 2.13.1+b5b864fd
DEBU OpenShift version: 4.12.0
DEBU Podman version: 4.3.1
DEBU Running 'crc status'
CRC VM:          Running
Podman:          4.3.1
RAM Usage:       192.6MB of 4.008GB
Disk Usage:      1.777GB of 32.68GB (Inside the CRC VM)
Cache Usage:     61.55GB
Cache Directory: C:\Users\Jeff\.crc\cache

CRC config

- consent-telemetry                     : no
- kubeadmin-password                    : kubeadmin
- memory                                : 4000
- preset                                : podman
- pull-secret-file                      : ..\pull-secret.txt

Host Operating System

Nom de l’hôte:                              DESKTOP-JEFF
Nom du système d’exploitation:              Microsoft Windows 11 Professionnel
Version du système:                         10.0.22621 N/A build 22621
Fabricant du système d’exploitation:        Microsoft Corporation
Configuration du système d’exploitation:    Station de travail autonome
Type de build du système d’exploitation:    Multiprocessor Free
Propriétaire enregistré:                    Jeff MAURY
Organisation enregistrée:
Identificateur de produit:                  00330-80819-37372-AA576
Date d’installation originale:              09/11/2022, 16:39:06
Heure de démarrage du système:              27/01/2023, 14:55:39
Fabricant du système:                       LENOVO
Modèle du système:                          20TJS2F43N
Type du système:                            x64-based PC
Processeur(s):                              1 processeur(s) installé(s).
                                            [01] : Intel64 Family 6 Model 165 Stepping 2 GenuineIntel ~2310 MHz
Version du BIOS:                            LENOVO N2VET29W (1.14 ), 15/03/2021
Répertoire Windows:                         C:\Windows
Répertoire système:                         C:\Windows\system32
Périphérique d’amorçage:                    \Device\HarddiskVolume1
Option régionale du système:                fr;Français (France)
Paramètres régionaux d’entrée:              fr;Français (France)
Fuseau horaire:                             (UTC+01:00) Bruxelles, Copenhague, Madrid, Paris
Mémoire physique totale:                    32 525 Mo
Mémoire physique disponible:                17 621 Mo
Mémoire virtuelle : taille maximale:        67 341 Mo
Mémoire virtuelle : disponible:             52 405 Mo
Mémoire virtuelle : en cours d’utilisation: 14 936 Mo
Emplacements des fichiers d’échange:        C:\pagefile.sys
Domaine:                                    WORKGROUP
Serveur d’ouverture de session:             \\DESKTOP-JEFF
Correctif(s):                               4 Corrections installées.
                                            [01]: KB5020880
                                            [02]: KB5012170
                                            [03]: KB5022303
                                            [04]: KB5020487
Carte(s) réseau:                            4 carte(s) réseau installée(s).
                                            [01]: Intel(R) Wi-Fi 6 AX201 160MHz
                                                  Nom de la connexion : Wi-Fi
                                                  DHCP activé :         Oui
                                                  Serveur DHCP :        192.168.0.254
                                                  Adresse(s) IP
                                                  [01]: 192.168.0.34
                                                  [02]: fe80::5102:6cd:7e09:85b2
                                                  [03]: 2a01:e34:ec7e:3020:5c21:e749:d7aa:ab25
                                                  [04]: 2a01:e34:ec7e:3020:5116:66ca:8d7a:292a
                                            [02]: Bluetooth Device (Personal Area Network)
                                                  Nom de la connexion : Connexion réseau Bluetooth
                                                  État :                Support déconnecté
                                            [03]: Wintun Userspace Tunnel
                                                  Nom de la connexion : OpenVPN Wintun
                                                  État :                Support déconnecté
                                            [04]: TAP-Windows Adapter V9
                                                  Nom de la connexion : OpenVPN TAP-Windows6
                                                  État :                Support déconnecté
Configuration requise pour Hyper-V:         Un hyperviseur a été détecté. Les fonctionnalités nécessaires à Hyper-V ne seront pas affichées.

Steps to reproduce

  1. set the podman preset
  2. crc start
  3. set podman environment: @FOR /f "tokens=*" %i IN ('crc podman-env') DO @call %i
  4. kind create cluster

Expected

Cluster is created

Actual

Output of kind create cluster command

enabling experimental podman provider
ERROR: failed to create cluster: running kind with rootless provider requires setting systemd property "Delegate=yes", see https://kind.sigs.k8s.io/docs/user/rootless/

Logs

Before gather the logs try following if that fix your issue

$ crc delete -f
$ crc cleanup
$ crc setup
$ crc start --log-level debug

Please consider posting the output of crc start --log-level debug on http://gist.github.com/ and post the link in the issue.

praveenkumar commented 1 year ago

@jeffmaury can you check with @FOR /f "tokens=*" %i IN ('crc podman-env --root') DO @call %i and then try to create kind cluster?

jeffmaury commented 1 year ago

@jeffmaury can you check with @FOR /f "tokens=*" %i IN ('crc podman-env --root') DO @call %i and then try to create kind cluster?

Cluster can be created if --root option is passed

cfergeau commented 1 year ago

enabling experimental podman provider ERROR: failed to create cluster: running kind with rootless provider requires setting systemd property "Delegate=yes", see https://kind.sigs.k8s.io/docs/user/rootless/

Looks like some ssh'ing into the VM would be needed, https://kind.sigs.k8s.io/docs/user/rootless/ explains which files need to be created.

praveenkumar commented 10 months ago

@gbraad we need to discuss it because our plan is to drop podman preset sooner.

gbraad commented 10 months ago

Does this work with the podman machinr setup?

jeffmaury commented 10 months ago

Does this work with the podman machinr setup?

YES with the restriction that you need to have a rootful machine on Windows.

anjannath commented 9 months ago

Podman preset on crc will soon be removed (see #3713), we need to test if the podman socket from the microshift preset can be used to run kind