Executing ESB artifacts on Kubernetes - Cloud - 8.0

Talend Software Development Life Cycle Best Practices Guide

Version
Cloud
8.0
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Cloud
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Administration Center
Talend Artifact Repository
Talend Cloud Management Console
Talend CommandLine
Talend JobServer
Talend Remote Engine
Talend Studio
Content
Administration and Monitoring
Deployment
Design and Development
Last publication date
2023-11-06
Available in...

Cloud API Services Platform

Cloud Data Fabric

Data Fabric

Data Services Platform

ESB

MDM Platform

Real-Time Big Data Platform

Before you begin

Make sure you have a Kubernetes cluster configured and running.

Procedure

  1. Create a demorestroute.yaml configuration file as follows to deploy the DemoRESTRoute artifact.
    # Kubernetes DemoRESTRoute deployment
    						#
    						apiVersion: v1
    						kind: Service
    						metadata:
    						name: demorestroute
    						labels:
    						app : demorestroute
    						spec:
    						ports:
    						- port: <MACHINE_PORT>
    						targetPort: 8065
    						name: http-demorestroute
    						selector:
    						app : demorestroute
    						---
    						apiVersion: extensions/v1beta1
    						kind: Deployment
    						metadata:
    						name: demorestroute-v1
    						spec:
    						replicas: 1
    						template:
    						metadata:
    						labels:
    						app : demorestroute
    						version: v1
    						spec:
    						containers:
    						- name: demorestroute
    						image: <ARTIFACT_REPOSITORY_DOCKER_REGISTRY>/<STUDIO_PROJECT>/demorestroute:latest
    						imagePullPolicy: IfNotPresent
    						ports:
    						- containerPort: 8065
    						---
    where
    • <MACHINE_PORT> corresponds to the port used to bind the host port to the container port
    • <ARTIFACT_REPOSITORY_DOCKER_REGISTRY> corresponds to the host of the URL of the artifact repository Docker registry (Nexus, Artifactory)
    • <STUDIO_PROJECT> corresponds to the Talend Studio project name that is the same as the Git project name. Project names must be in upper case.
  2. Execute the kubectl apply -f demorestroute.yaml command to deploy the artifact to Kubernetes.

    Example

    $ kubectl apply -f demorestroute.yaml
    		service/demorestroute created
    		deployment.extensions/demorestroute-v1 created
  3. Execute the kubectl get po command to check that the Kubernetes pod is up and running.

    Example

    $ kubectl get po
    NAME                                READY   STATUS    RESTARTS   AGE
    demorestroute-v1-6c4dc67648-z6zh7   1/1     Running   0          8s
  4. Access the endpoint in a browser, an XML document is returned.

    Example

    http://localhost:<MACHINE_PORT>/services/customers
  5. Execute the kubectl delete -f demorestroute.yaml command to clean the Kubernetes pod after deploying the artifact.

    Example

    $ kubectl delete -f demorestroute.yaml
    service "demorestroute" deleted
    deployment.extensions "demorestroute-v1" deleted