- 1.Start build and save the container image
- 2.Deploy the application and expose the service
- We will define and apply a deployment configuration (yaml) to create a Pod with our Microservice
- We will define a service which routes requests to the Pod with our Microservice
REMEMBER: You should know this from the prerequisites.
[YOUR_REGISTRY] = us.icr.io
[YOUR_REGISTRY_NAMESPACE] = cloud-native-suedbro
us.icr.io/cloud-native-suedbro/authorsand save it somewhere, we need this later in the
A Pod is the basic building block of Kubernetes-the smallest and simplest unit in the Kubernetes object model that you create or deploy. A Pod represents processes running on your Cluster .
kinddefines this as a
specsection we specify an app name and version label.
namefor the container and we provide the container
imagelocation, e.g. where the container can be found in the Container Registry.
containerPortdepends on the port definition inside our Dockerfile and in our server.xml.
../authors-java-jee/deployment/deployment.yamlfile with a editor and replace the value for the container image location with the path we got from the IBM Container Registry and just replace the
authors:1text, and add following statement
imagePullPolicy: Alwaysand save the file.
imagePullPolicy: Alwayswe force that the image is pulled from the IBM Cloud Container Registry and not cashed image in Kubernetes is possible used, when we change our container image IBM Cloud Container Registry.
A Kubernetes Service is an abstraction which defines a logical set of Pods and a policy by which to access them - sometimes called a micro-service. The set of Pods targeted by a Service is (usually) determined by a Label Selector.
Expose a public port on your worker node and use the public IP address of the worker node to access your service in the cluster publicly from the internet.