Deploying the SecurityServer with NGINX Container Image into OpenShift Container Platform

  1. Log in to the OpenShift Server using the command below:

›_ Console

# oc login -u <username> -p <password> https:// <server_ip>:6443

  1. Create the replicaset YAML file, which will pull the SecurityServer container image from Docker Hub registry using pull secret.

›_ Console

apiVersion: apps/v1 kind: ReplicaSet metadata:

name: securityserver-pod spec:

replicas: 2 selector:

matchLabels: app: my-app

template: metadata:

labels:

app: my-app spec:

containers:

- name: cryptopod

image: <Docker_Repository>/securityserver imagePullPolicy: IfNotPresent

command: ["/bin/bash","-c"]

args: ["/usr/sbin/nginx;while true; do sleep 30; done;"] imagePullSecrets:

- name: <pull_secret_name>

Update the Repository, Image, and Pull Secret Name accordingly.

  1. Deploy the replicaset YAML file. This will create the no of specified replicas of pods with NGINX running over HTTPS.

›_ Console

# oc apply-f deploy.yaml

821d1af4-bab4-420e-b480-c5aa81c69342.jpg

oc apply output

  1. Verify that the pods are up and running.

›_ Console

# oc get pods -o wide

75647f11-e31f-4c7c-b249-a5698895e81a.jpg


Pods running status