Deploying the CP5 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 CP5 container image from Docker Hub registry using pull secret.

›_ Console

apiVersion: apps/v1 kind: ReplicaSet metadata:

name: cp5pod spec:

replicas: 2 selector:

matchLabels: app: my-app

template: metadata:

labels:

app: my-app spec:

containers:

- name: cryptopod

image: <Docker_Repository>/cp5image:1 imagePullPolicy: IfNotPresent command: ["/bin/bash","-c"]

args: ["/opt/utimaco/bin/csadm Dev=<port>@<ip_address> GetHSMAuthKey >

/tmp/HSMauth.key;/usr/sbin/nginx;while true; do sleep 30; done;"]

imagePullSecrets:

- name: <pull_secret_name>

Update the Repository, Image, Port, IP Address of HSM, 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

  1. Verify that the pods are up and running.

›_ Console

# oc get pods -o wide

b7f2a3ff-e00a-4551-95a2-849bb5b1de23.jpg


Pods running status