Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filled in example from class #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion buildconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
source:
type: Git
git:
uri:
uri: https://github.com/allen13/hello-openshift.git

---

Expand Down
24 changes: 18 additions & 6 deletions deployment.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name:
name: hello-openshift
labels:
app:
app: hello-openshift
spec:
replicas:
replicas: 3
selector:
matchLabels:
app:
app: hello-openshift
template:
metadata:
labels:
app:
app: hello-openshift
spec:
containers:
containers:
- name: hello-openshift
image: image-registry.openshift-image-registry.svc:5000/timothya/hello-openshift
env:
# learn about the downward api https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/#the-downward-api
- name: HELLO
valueFrom:
fieldRef:
fieldPath: metadata.name
ports:
- name: web
containerPort: 8090
protocol: TCP
10 changes: 5 additions & 5 deletions pod.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apiVersion: v1
kind: Pod
metadata:
name:
name: hello-openshift
labels:
app:
app: hello-openshift
spec:
containers:
- name:
image: image-registry.openshift-image-registry.svc:5000/<your namespace>/hello-openshift
- name: hello-openshift
image: image-registry.openshift-image-registry.svc:5000/timothya/hello-openshift
env:
# learn about the downward api https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/#the-downward-api
- name: HELLO
Expand All @@ -16,5 +16,5 @@ spec:
fieldPath: metadata.name
ports:
- name: web
containerPort:
containerPort: 8090
protocol: TCP
10 changes: 5 additions & 5 deletions route.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ apiVersion: route.openshift.io/v1
kind: Route
metadata:
labels:
app:
name:
app: hello-openshift
name: hello-openshift
spec:
port:
targetPort: web
to:
kind:
name:
kind: Service
name: hello-openshift
weight: 100
tls:
termination:
termination: edge
wildcardPolicy: None
12 changes: 6 additions & 6 deletions svc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ apiVersion: v1
kind: Service
metadata:
labels:
app:
name:
app: hello-openshift
name: hello-openshift
spec:
ports:
- name: web
port:
port: 8080
protocol: TCP
targetPort:
targetPort: web
selector:
app:
app: hello-openshift
sessionAffinity: None
#Pick from below
type:
type: ClusterIP

# Types of Kubernetes services
# There are four types of Kubernetes services:
Expand Down