Deploying ActiveMatrix Service Grid - Container Edition Application in Kubernetes
You can deploy ActiveMatrix Service Grid - Container Edition application to Kubernetes by using the Kubernetes deployment YAML file.
Before You Begin
- See Preparing for Containerization.
- Ensure that you have created a Docker image of an application. Upload the Docker image to a suitable public or private registry that is accessible from your Kubernetes cluster. For more information, see Containerizing ActiveMatrix Service Grid Applications.
- Procedure
- Create a Kubernetes deployment YAML file that is required to deploy an application. Sample YAML file is at
amsgce-runtime-<version>/samples/kubernetes/amxce_k8s_template.yaml. For more information about YAML file configurations, see Sample Kubernetes YAML File for Deploying an Application. -
Run the
applycommand ofkubectlutility to deploy an application to Kubernetes.kubectl apply -f <deployment_file>Example:
kubectl apply -f bookstore-deployment.yaml -
Get the external IP of your application, which you can then use to connect to the cluster. Use the external service name defined in the application deployment file.
Syntax:
kubectl get services <external_service_name> -n <namespace>
Example:
kubectl get services bookstore-service -n bookstore-ns
-
You can check the logs of container pods by using the following command:
kubectl logs <pod> -n <namespace>
What to do nextTest the application by using the external IP obtained.