martedì 16 luglio 2024

How to deploy Podman images to OpenShift Container Platform (CRC on localhost)

I have a microservice on localhost and I want to deploy its Podman image on OCP, which I am running using CRC on localhost.

     


1.
Get the image registry of ocp:

oc registry info

or

oc get route default-route -n openshift-image-registry

2.Create a is.yaml file

oc create -f is.yaml 

3.Tag podman image:

podman tag image_name `oc registry info`/project_name/image_name:latest

4.Authenticate podman

podman login `oc registry info` -u kubeadmin -p `oc whoami -t` --tls-verify=false

5.Push Podman image

podman push image_id `oc registry info`/project_name/image_name:latest --tls-verify=false

6.Create new app on OpenShift


oc new-app --docker-image=`oc registry info`/project_name/image_name:latest --name=new_app_name -l app=
new_app_name

 


How to deploy Podman images to OpenShift Container Platform (CRC on localhost)

I have a microservice on localhost and I want to deploy its Podman image on OCP, which I am running using CRC on localhost.       1. Get the...