Bringing up an App Connect Professional Docker container in Kubernetes
Before you begin
- Ensure the Docker image is available on Kubernetes worker nodes by running the following command:
Docker Command to load into local repository:
docker load < 7.5.4.0-dockerimage_built-20201903-1338_H28_64.tar
You can use the following Docker command to list all the existing images:
docker images
Example format of output from the preceding command:
<ibmappconnect> 7.5.4.0 92f880af3c92 14 hours ago 1.6 GB
Procedure
Sample castiron yaml file:
apiVersion: apps/v1
kind: Deployment
metadata:
name: castiron-deployment
labels:
app: castiron
spec:
replicas: 1
selector:
matchLabels:
app: castiron
template:
metadata:
labels:
app: castiron
spec:
containers:
- name: castiron
image: ibmappconnect:7.5.4.0
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8443
name: wmc
- containerPort: 9443
name: gateway
- containerPort: 443
name: httpsserver
- containerPort: 80
name: httpserver
Sample castiron-sevice.yaml file
apiVersion: v1
kind: Service
metadata:
labels:
app: castiron
name: castiron-deployment
namespace: default
spec:
externalTrafficPolicy: Cluster
ports:
- name: port-1
nodePort: 30329
port: 8443
protocol: TCP
targetPort: 8443
- name: port-2
nodePort: 31278
port: 9443
protocol: TCP
targetPort: 9443
- name: port-3
nodePort: 31326
port: 443
protocol: TCP
targetPort: 443
- name: port-4
nodePort: 30727
port: 80
protocol: TCP
targetPort: 80
selector:
app: castiron
type: NodePort
status:
loadBalancer: {}