So we, as an organization need to utilize Podman’s rootless feature in place of Docker. I understand that Docker has something similar, but our client wants Podman specifically. So with that said, myself being very new to Rancher and the world of Kubenettes decided to find a simple hello world test.
My first goal was to actually get Rancher and its dependencies installed so I could use Rancher on a local machine. you can explore my exploits here, link @malcolmlewis1 was a huge help in getting me this far.
So to test out a simple nginx server I proceeded to do the following.
create a simple cluster file
bring the cluster up
rke up --config local-cluster.yml
export KUBECONFIG
export KUBECONFIG=$(pwd)/kube_config_local-cluster.yml
setup a quick nginx folder with docker file and build the image
mkdir nginx
cd nginx
echo “<h1>Hello World from NGINX!!” > index.htmlvim Dockerfile
FROM nginx:alpine
COPY . /usr/share/nginx/htmldocker build --tag nginx-helloworld:latest .
before deploying to kubernetes I verify that kubectl is looking at the cluster
kubectl get nodes
next to deploy
kubectl run hello-world --image=nginx-helloworld:latest --image-pull-policy=Never --port=80
kubectl port-forward pods/hello-world 8080:80
I verify that its working, at least I think I’ve verified it
I verified that the pod is present
kubectl get pods
I see the text that I’m expecting. when I access the port
curl localhost:8080
Now, based on what I’m seeing, nginx is running inside the cluster am I correct?
next, I need to replace the docker pod with Podman pods. This is fairly easy to create the image, I simply replace all the commands I’ve used for building the docker image with Podman. Sweet done. Well no. I now need to point Kubectl at the Podman images. I haven’t been able to find any reference as to how to do that. The local-cluster.rkestate has several references to Docker in it. So I’m assuming I might need to build the cluster itself knowing that it uses Podman. Can someone point me to a site that has any information on how to do that?
In advance, thank you for your time and help.