Java Magazine, May/June 2019
ORACLE COM JAVAMAGAZINE MAY JUNE 2019 15 containers Moving to Kubernetes With Docker you can build container images create containers and manage images and containers locally Kubernetes comes into play when it is time to deploy containers in production and at scale In Kubernetes containers are deployed in groups of related containers called pods A pod is a deployable unit and may contain more than one container For example a pod might contain two containers one running a web server and the other being a logging service for the server Later you will create a pod for your microservice and it will have just one container an instance of your helidon quickstart se image Part of the role of Kubernetes is to ensure your application services are up and running You describe what should be run and monitored by defining a deployment Kubernetes will monitor the health of pods within a deployment and it will restart the containers within a pod if they stop running Deployments are the best way to deploy and scale pods on Kubernetes Lets start by testing your local Kubernetes cluster with a simple example First to get your local cluster spun up invoke the minikube start command This command provides a running status of its progress Wait for the completion message before moving on minikube start minikube v0350 on darwin amd64 Done Thank you for using minikube The Minikube installation comes with kubectl the primary interface to Kubernetes Like the Docker client it is a powerful multipurpose tool for interacting with all aspects of your cluster and the containers deployed to it Use kubectl create to create a simple deployment with a prebaked hello world example Then use kubectl get to show your deployment and the pods within it Youll see something like this
You must have JavaScript enabled to view digital editions.