6.4. Déployer un exemple d’application
Créez un nouveau projet pour votre exemple d’application en exécutant la commande suivante:
oc new-project hello-world
$ oc new-project hello-world
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Déployez une application hello world:
oc -n hello-world new-app --image=docker.io/openshift/hello-openshift
$ oc -n hello-world new-app --image=docker.io/openshift/hello-openshift
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Créer un itinéraire pour l’application spécifiant votre nom de domaine personnalisé:
Exemple :
oc -n hello-world create route edge --service=hello-openshift hello-openshift-tls \ --hostname hello-openshift.${DOMAIN}
$ oc -n hello-world create route edge --service=hello-openshift hello-openshift-tls \ --hostname hello-openshift.${DOMAIN}
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Étiqueter la route pour l’admettre à votre contrôleur d’entrée personnalisé:
oc -n hello-world label route.route.openshift.io/hello-openshift-tls route=waf
$ oc -n hello-world label route.route.openshift.io/hello-openshift-tls route=waf
Copy to Clipboard Copied! Toggle word wrap Toggle overflow