-
Change
apiVersionfrom:- apiVersion: v1
(or
apiVersion: apps.openshift.io/v1)to:
- apiVersion: apps/v1
-
Change
kindfrom:kind: DeploymentConfig
to:
kind: Deployment
-
Change
spec.selectorsfrom:selector: name: ...
to:
selector: matchLabels: name: ...
-
Make sure
spec.template.spec.containers.imageis set, e.g.image: registry.access.redhat.com/rhscl/postgresql-${POSTGRESQL_VERSION}-rhel7 imagePullPolicy: Always -
Remove
spec.triggerssection entirely
Last active
October 8, 2024 19:38
-
-
Save bmaupin/d5be3ca882345ff92e8336698230dae0 to your computer and use it in GitHub Desktop.
Convert OpenShift DeploymentConfig to Kubernetes Deployment
I also had to remove spec.strategy and spec.test section entirely
If could be useful I wrote down a little script to automate the conversion https://gist.github.com/bomboclat/1c53b7e692b1df58af67598337cc2b88
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hehe, I got parsed template using
oc process --local, then replacedDeploymentConfigtoDeploymentwith jq: