Here is the scenario. I have a bunch of pods, services and routes already created. However there is no replication controller. How do I just add a replication controller to those existing objects.

Here's the sample yaml for the kubernetes objects. https://github.com/openshift/origin/tree/release-3.9/examples/wordpress


oc run mysql --image=openshift/mysql-55-centos7 --env="MYSQL_ROOT_PASSWORD=yourpassword" --env="MYSQL_USER=wp_user" --env="MYSQL_PASSWORD=wp_pass" --env="MYSQL_DATABASE=wp_db" --port=3306 --expose

oc run wordpress --image=wordpress --env="WORDPRESS_DB_USER=wp_user" --env="WORDPRESS_DB_PASSWORD=wp_pass" --env="WORDPRESS_DB_NAME=wp_db" --env="WORDPRESS_DB_HOST=mysql" --port=80 --expose

modify them after dc creation to add storage to those pods (used the UI) and then create your own route (used the UI).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.