Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save praveenkumar/5ed3a2bacc38615fd4b2b3cf74f445c2 to your computer and use it in GitHub Desktop.
Save praveenkumar/5ed3a2bacc38615fd4b2b3cf74f445c2 to your computer and use it in GitHub Desktop.
Consuming Podman and kubernetes api using OpenShift Local VM
Instructions about how to use podman from OpenShift Local VM
@praveenkumar
Copy link
Author

Note: Please make sure after the installation if the installer asks to reboot the system then do it before going to next steps.

Open the windows powershell/terminal and run the following

$ crc config set preset microshift
$ crc setup
$ crc start

Once you have running cluster using crc then try following

> crc status
CRC VM:      	Running
MicroShift:  	Running (v4.16.0)
RAM Usage:   	2.022GB of 3.828GB
Disk Usage:  	5.789GB of 16.1GB (Inside the CRC VM)
Cache Usage: 	7.409GB
Cache Directory: C:\Users\rhqp\.crc\cache

This will provide the podman.exe to the current path, if you already have that then ignore this step and use next one.

> & crc podman-env --root | Invoke-Expression

Use podman system connection to add the socket for remote

Note: Make sure change the <user_name> with actual username

> podman system connection add crc-root --identity "C:\Users\<user_home>\.crc\machines\crc\id_ecdsa"  "ssh://[email protected]:2222/run/podman/podman.sock"

> podman system connection add crc --identity "C:\Users\<user_home>\.crc\machines\crc\id_ecdsa"  "ssh://[email protected]:2222/run/user/1000/podman/podman.sock"

> podman system connection ls
Name    	URI                                                     	Identity                              	Default
crc     	ssh://[email protected]:2222/run/user/1000/podman/podman.sock  C:\Users\rhqp\.crc\machines\crc\id_ecdsa  false
crc-root	ssh://[email protected]:2222/run/podman/podman.sock        	C:\Users\rhqp\.crc\machines\crc\id_ecdsa  true

With that now you have podman connected to the microshift VM using ssh and you don’t need a podman-machine VM to run podman specific commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment