Created
August 24, 2020 19:04
-
-
Save Miciah/39a1cebb609d472b0993aa86b83c9595 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% oc adm new-project hello-openshift | |
Created project hello-openshift | |
% oc -n hello-openshift create -f ~/src/github.com/openshift/origin/examples/hello-openshift/hello-pod.json | |
pod/hello-openshift created | |
% oc -n hello-openshift expose pod/hello-openshift | |
service/hello-openshift exposed | |
% INGRESS_DOMAIN="$(oc get ingress.config/cluster -o 'jsonpath={.spec.domain}')" | |
% oc -n hello-openshift create -f - <<EOF | |
apiVersion: networking.k8s.io/v1beta1 | |
kind: Ingress | |
metadata: | |
name: hello-openshift | |
namespace: hello-openshift | |
spec: | |
tls: | |
- {} | |
rules: | |
- host: hello-openshift-hello-openshift.$INGRESS_DOMAIN | |
http: | |
paths: | |
- backend: | |
serviceName: hello-openshift | |
servicePort: 8080 | |
EOF | |
W0824 14:50:50.291562 31871 warnings.go:67] networking.k8s.io/v1beta1 Ingress is deprecated in v1.19+, unavailable in v1.22+; use networking.k8s.io/v1 Ingress | |
ingress.networking.k8s.io/hello-openshift created | |
% oc -n hello-openshift get routes | |
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD | |
hello-openshift-2xmts hello-openshift-hello-openshift.apps.ci-ln-838cvct-f76d1.origin-ci-int-gce.dev.openshift.com hello-openshift <all> edge/Redirect None | |
% curl -v http://hello-openshift-hello-openshift.apps.ci-ln-838cvct-f76d1.origin-ci-int-gce.dev.openshift.com | |
* About to connect() to hello-openshift-hello-openshift.apps.ci-ln-838cvct-f76d1.origin-ci-int-gce.dev.openshift.com port 80 (#0) | |
* Trying 34.73.78.178... | |
* Connected to hello-openshift-hello-openshift.apps.ci-ln-838cvct-f76d1.origin-ci-int-gce.dev.openshift.com (34.73.78.178) port 80 (#0) | |
> GET / HTTP/1.1 | |
> User-Agent: curl/7.29.0 | |
> Host: hello-openshift-hello-openshift.apps.ci-ln-838cvct-f76d1.origin-ci-int-gce.dev.openshift.com | |
> Accept: */* | |
> | |
< HTTP/1.1 302 Found | |
< content-length: 0 | |
< location: https://hello-openshift-hello-openshift.apps.ci-ln-838cvct-f76d1.origin-ci-int-gce.dev.openshift.com/ | |
< cache-control: no-cache | |
< | |
* Connection #0 to host hello-openshift-hello-openshift.apps.ci-ln-838cvct-f76d1.origin-ci-int-gce.dev.openshift.com left intact | |
% curl -k https://hello-openshift-hello-openshift.apps.ci-ln-838cvct-f76d1.origin-ci-int-gce.dev.openshift.com | |
Hello OpenShift! | |
% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment