You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kubernetes is an open source system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications.
5
5
6
-
Kubernetes, or "`k8s`" in short, allows the user to provide declarative primitives for the desired state, for example "`need 5 WildFly servers and 1 MySQL server running`". Kubernetes self-healing mechanisms, such as auto-restarting, re-scheduling, and replicating containers then ensure this state is met. The user just define the state and Kubernetes ensures that the state is met at all times on the cluster.
6
+
Kubernetes, or "`k8s`" in short, allows the user to provide declarative primitives for the desired state, for example "`need 5 WildFly servers and 1 MySQL server running`". Kubernetes self-healing mechanisms, such as auto-restarting, re-scheduling, and replicating containers then ensure that this state is met. The user just define the state and Kubernetes ensures that the state is met at all times on the cluster.
7
7
8
8
*How is it related to Docker?*
9
9
@@ -45,7 +45,6 @@ Kubernetes cluster can be easily started using Vagrant. There are two options to
45
45
[source, text]
46
46
----
47
47
cd kubernetes
48
-
49
48
export KUBERNETES_PROVIDER=vagrant
50
49
./cluster/kube-up.sh
51
50
----
@@ -65,6 +64,11 @@ Using credentials: vagrant:vagrant
65
64
66
65
. . .
67
66
67
+
Validate output:
68
+
NAME STATUS MESSAGE ERROR
69
+
controller-manager Healthy ok nil
70
+
scheduler Healthy ok nil
71
+
etcd-0 Healthy {"health": "true"} nil
68
72
Cluster validation succeeded
69
73
Done, listing cluster services:
70
74
@@ -75,7 +79,7 @@ KubeUI is running at https://10.245.1.2/api/v1/proxy/namespaces/kube-system/serv
75
79
+
76
80
Note down the address for Kubernetes master, `https://10.245.1.2` in this case.
77
81
78
-
#### Download and Start the Cluster Together
82
+
#### Download and Start the Kubernetes Cluster
79
83
80
84
. Alternatively, the cluster can also be started as:
81
85
+
@@ -181,6 +185,7 @@ kubernetes> ./cluster/kubectl.sh get rc
### Deploy Java EE Application (multiple configuration files)
185
190
186
191
Pods, and the IP addresses assigned to them, are ephemeral. If a pod dies then Kubernetes will recreate that pod because of its self-healing features, but it might recreate it on a different host. Even if it is on the same host, a different IP address could be assigned to it. And so any application cannot rely upon the IP address of the pod.
@@ -190,7 +195,7 @@ Kubernetes services is an abstraction which defines a logical set of pods. A ser
190
195
.Kubernetes Service
191
196
image::kubernetes-service.png[]
192
197
193
-
NOTE: In this case, all the pods are running on a single node. This is because, that is the default number for a Kubernetes cluster. The pod can very be on another node if more number of nodes are configured to start in the cluster.
198
+
NOTE: In this case, all the pods are running on a single node. This is because, that is the default number for a Kubernetes cluster. The pod can be on another node if more number of nodes are configured to start in the cluster.
194
199
195
200
Any Service that a Pod wants to access must be created before the Pod itself, or else the environment variables will not be populated.
196
201
@@ -395,7 +400,7 @@ Send a PR for https://github.com/javaee-samples/docker-java/issues/80
395
400
396
401
Kubernetes allow multiple resources to be specified in a single configuration file. This allows to create a "`Kubernetes Application`" that can consists of multiple resources easily.
397
402
398
-
Previous section showed how to deploy the Java EE application using multiple configuration files. This application can be delpoyed using a single configuration file as well.
403
+
<<Deploy_JavaEE_Kubernetes_Multiple_Config>> showed how to deploy the Java EE application using multiple configuration files. This application can be delpoyed using a single configuration file as well.
399
404
400
405
. Start the application using the configuration file:
0 commit comments