Apama 10.11.3 | Deploying and Managing Apama Applications | Deploying Apama Applications with Kubernetes | Quick start to using Apama in Kubernetes
 
Quick start to using Apama in Kubernetes
For this quick start, you have to build the image from the Simple sample that can be found in the samples/docker/applications/Simple directory of your Apama installation. See the README.txt file in the samples/docker/applications directory for detailed instructions.
Once you have built the image, proceed as described below.
1. Define a deployment YAML file which references the image you wish to run as a container. An example of this is the kubernetes.yml file which can be found in the samples/docker/applications/Simple directory of your Apama installation.
This example YAML file creates a pod. However, Kubernetes can be used to define much more complex objects and behaviors; see the Kubernetes documentation for details of the possible configurations.
2. Use the Kubernetes command line tool (kubectl) to create the container and run it (for example, using the above example YAML file):
kubectl create -f kubernetes.yml
The create command starts the container under Kubernetes control. You can now use the kubectl command line to interrogate the pod that has been created, see below.
3. To return the name of the pod that corresponds to running your Apama container:
kubectl get pods
4. To examine the logs from the container in the pod:
kubectl logs podname
5. Once you are finished, you can shut down everything and remove the containers. To do so, you use the same YAML file that has been used to start the process:
kubectl delete -f kubernetes.yml
The power of Kubernetes comes with more complex setups involving multiple containers and hosts. Some of these features are covered in more complex samples; see Apama samples for Kubernetes for further information.