[DOCKER] 1. Quickly run Java web modules on Google Kubernetes Engine (GKE)

Introduction

I wanted to know what kubernetes is, so I tried running a simple web module with GKE for the time being. There are many places where security, operational aspects, optimization, etc. are not taken into consideration in the content of this article. Please note.

<< Environment >> (as of March 9, 2019) gke master version: 1.11.7-gke.4 jdk:openjdk-11.0.2 gradle:gradle-5.2.1 tomcat:apache-tomcat-9.0.17 DB:PostgreSQL-9.6 (cloud SQL)

<< Article structure >> Please read from 1 in order. It is completed in 4.

  1. Quickly run Java web module with Google Kubernetes Engine (GKE)
  2. Create Docker image and register registry
  3. Create a database to access from the Web module
  4. Create Manifest and Run Web Module (https://qiita.com/Turtle-child-No2/items/23982059d188e44618df)

1-1. Creating a cluster

Step 1-1.1.

First, create a cluster to run the web module. Select a project at the top of the Google Cloud Platform (GCP) management screen. Select Kubernetes Engine-> Engine from the side menu. 001.png

Step 1-1.

After waiting for a while, click "Create Cluster". 002.png 004.png

Step 1-1.3.

Select "Standard Cluster" from the side menu. 005.png

Step 1-1.

Select Region as the location type, us-central1 as the region, and 1 as the number of nodes in the default-pool. 006.png

Step 1-1.5

Click "Advanced Editing" and uncheck "Enable automatic upgrade" and "Enable automatic repair" in the management on the details screen. Click "Save" on the details screen. 007.png 008.png 009.png

Step 1-1.6

Finally, click "Create". 010.png

Step 1-1.7

After a while, the cluster creation will be completed. This completes the creation of the GKE cluster. 011.png

Step 1-1.8

Let's check the nodes that make up the cluster. Select Compute Engine-> VM Instances from the side menu. 012.png

Step 1-1.9

Three VMs have been created. When I created the cluster earlier, I selected "Region" and entered "1" for the number of nodes (per zone), so one node was created for each of the three zones that belong to the region. The nodes that make up the cluster are created for each zone to reduce the risk of service outages. 013.png that's all

Recommended Posts

1. Quickly run Java web modules on Google Kubernetes Engine (GKE)
Run analysis with OpenJDK11 Java Flight Recorder + Google Kubernetes Engine
I put the Quarkus app on GKE (Google Kubernetes Engine).
Run PostgreSQL on Java
Run java applet on ubuntu
Run Java EE applications on CICS
Run tomcat shell script on java8
Deploy a Java web app on Heroku
Building Java Web Applications on Windows Server 2016
Build Web Application Server (Java) on VPS