Learning Library

← Back to Library

Deploy Java Apps on IBM Kubernetes

Key Points

  • The IBM Cloud App Service lets you quickly create a cloud‑native app by choosing a starter kit (e.g., Java Web App with Spring) and naming the project within minutes.
  • You can attach IBM services such as a Cloudant database during setup, selecting region, resource group, and pricing plan, which are then automatically bound to your Kubernetes cluster as secrets.
  • Configuring continuous delivery creates a DevOps toolchain that includes a private Git repository, the Eclipse Orion web IDE, and a delivery pipeline with build, deploy, and health stages triggered by changes to the master branch.
  • Deployment to an IBM Kubernetes Service cluster uses a Helm chart packaged in the source code, and the pipeline can be extended by adding custom stages to fit specific workflows.

Full Transcript

# Deploy Java Apps on IBM Kubernetes **Source:** [https://www.youtube.com/watch?v=QfOqM7j_RgY](https://www.youtube.com/watch?v=QfOqM7j_RgY) **Duration:** 00:04:45 ## Summary - The IBM Cloud App Service lets you quickly create a cloud‑native app by choosing a starter kit (e.g., Java Web App with Spring) and naming the project within minutes. - You can attach IBM services such as a Cloudant database during setup, selecting region, resource group, and pricing plan, which are then automatically bound to your Kubernetes cluster as secrets. - Configuring continuous delivery creates a DevOps toolchain that includes a private Git repository, the Eclipse Orion web IDE, and a delivery pipeline with build, deploy, and health stages triggered by changes to the master branch. - Deployment to an IBM Kubernetes Service cluster uses a Helm chart packaged in the source code, and the pipeline can be extended by adding custom stages to fit specific workflows. ## Sections - [00:00:00](https://www.youtube.com/watch?v=QfOqM7j_RgY&t=0s) **Deploying Java App with IBM Cloud** - The speaker demonstrates creating a Java Spring web application in IBM Cloud App Service, adding a Cloudant database, and configuring a continuous delivery toolchain to deploy the app to Kubernetes. ## Full Transcript
0:00today let's examine how you can use the 0:02IBM cloud app service to get started 0:04building cloud native applications and 0:06deploy to kubernetes on IBM cloud the 0:09IBM cloud app service offers a guided 0:11approach to creating new cloud 0:13applications and it lets you start 0:15building your new apps in just a matter 0:17of minutes well start by clicking on the 0:20get started button on the IBM cloud app 0:22service web page the first step is to 0:25select the appropriate starter kit based 0:26on the application we want to build 0:28there our starter kits available for 0:30building both web apps and micro 0:32services using popular languages 0:34including Java Swift Python and nodejs 0:38in this case we're going to select the 0:41Java Web App with spring we're going to 0:43go ahead and click the Create app button 0:45we're going to give our app a name we're 0:48gonna select a resource group we'll go 0:51ahead and hit create our basic project 0:54has now been created and here we have 0:57the ability to start adding services or 0:59resources iBM has a host of services 1:02that you can use in this case let's 1:05select a database 1:10and we'll pick Cloudant we'll select a 1:14region a resource group and a pricing 1:18plan will stick with light for now 1:20as you can see the Cloudant database 1:22service has been configured and added to 1:24a project now that we have the service 1:26added we're ready to setup the DevOps 1:29toolchain for kubernetes deployment we 1:31can do this by clicking on configure 1:33continuous delivery the first step in 1:37setting up our DevOps tool chain is 1:39selecting a deployment method we have a 1:42few options here we can deploy to IBM 1:45kubernetes service deploy a cloud 1:47foundry or deploy to a virtual server in 1:50this case let's target our cluster you 1:54can select which cluster you'd like to 1:56target and then click Next then we can 2:00enter a tool chain name region and 2:02resource group and then click create 2:06this will configure the DevOps tool 2:09chain and create a private git 2:10repository for starter application code 2:13this process also binds your IBM cloud 2:16services to your kubernetes cluster so 2:18that authentication credentials will be 2:20bound to the cluster and available in 2:22your kubernetes secrets here we can see 2:25that the tool chain has been created and 2:27added to our project let's click on the 2:30view tool chain button to see exactly 2:32what it's doing 2:38here we see all the tools that were 2:40configured in the previous steps it 2:42includes the private git repository the 2:45Eclipse Orion web IDE for accessing your 2:48code when you're not on your primary 2:49workstation and the delivery pipeline 2:52let's click delivery pipeline to get a 2:55detailed look at how its configured our 2:59pipeline includes a build stage a deploy 3:02stage and a health stage any changes to 3:06the repositories master branch will 3:08trigger the pipeline and the pipeline's 3:10deploy stage performs a kubernetes 3:12deployment using the helm chart that 3:13exists as part of the application source 3:16tree you can also click on add stage to 3:19customize for your needs and your 3:21workflows now that our projects been 3:23created we're ready to set up our local 3:25environment to start developing will do 3:28this by copying the project's git 3:30repository URL then we can run a git 3:34clone to pull the project locally 3:44I've now opened the project in Visual 3:47Studio code here we can see it includes 3:50all the configuration and source files 3:53that are needed to build and deploy our 3:54project for more information on local 3:57development be sure to check out our 3:59other videos on using the IBM cloud 4:01developer tools command-line interface 4:04last but not least let's switch back to 4:06our browser and view the kubernetes 4:08dashboard when I hit refresh 4:14you can see here that our project has 4:16been deployed we can see that our 4:19deployment 4:22pods 4:25services 4:28and even the secrets that contain 4:30authentication credentials to access our 4:32IBM services the IBM cloud app service 4:36makes it simple to start building new 4:38cloud native applications you can get 4:41started today by visiting cloud at