CSC Cloud — Using CSC Cloud

Deploying Containerized Applications

DeploymentConfig

create deployment config

deployment config

Service

service menu

Paste this code:

kind: Service
apiVersion: v1
metadata:
  name: example-svc
  namespace: rahtidemotests # Must match your namespace / project name
spec:
  selector:
    app: hello-openshift # Must match your DeploymentConfig name
  ports:
    - name: 8080-tcp
      protocol: TCP
      port: 8080
      targetPort: 8080
    - name: 8888-tcp
      protocol: TCP
      port: 8888
      targetPort: 8888

create service

Route

route menu

Paste this code:

apiVersion: route.openshift.io/v1
kind: Route
metadata:
  name: example-route
  namespace: rahtidemotests
spec:
  host: hello-openshift-tutorial.rahtiapp.fi # Change the name
  port:
    targetPort: 8080-tcp # Must match your service port name 
  tls:
    termination: edge
    insecureEdgeTerminationPolicy: Redirect
  to:
    kind: Service
    name: example-svc # Must match your service name

create route

Accessing the application

new route

Cleanup

  1. On the DeploymentConfig page, click your Deployment Config > Actions > Delete Deployment Config
  2. On the Service page, click your Service > Actions > Delete Service
  3. On the Route page, clik your Route > Actions > Delete Route