This article records my experience of running Oracle live lab — which is a good starting point of anyone’s cloud journey. The objective is to provision Oracle Container Engine for Kubernetes (OKE) service and deploy application on it.
The OKE is a managed service, which means you don’t need to worry about the maintenance activities and therefore focus more on the application. More information about OKE can be found here.
Here’s what we are gong to do.
- Provision OKE cluster
- Download application, prepare deployment and access
Step 1: Provision OKE Cluster
Login to Oracle console and navigate to Developer Services -> Containers & Artifacts -> Kubernetes Clusters (OKE). Once you click on the link it will take you to the provisioning page.
There you can see ‘Create Cluster’ button to start the provisioning. There we have two options, ‘quick create’ and ‘Customer create’. In this exercise we pick ‘Quick create’ as our intention to see the functionality of the application deployment. This option will create all the necessary resources required to run the OKE.
Next step is to provide the deployment details of the cluster. Our preference for this exercise are as follows;
- API Endpoint: Public (can access API from public network)
- Worker nodes : Private (Cluster instances are private and cannot access from public network)
- Shape: VM.Standard.A1.Flex ( This is ARM based architecture)
- Image : Oracle Linux 8
Evaluate the details and click ‘Create cluster’ button to begin the process.
Once the provisioning is completed, you can see the cluster home page as shown in Figure 6.
Now we need to configure access to the cluster. In order to get the necessary details, click on the ‘Access Cluster’ button on home page. As you can see from figure 7 there’re two options to access the cluster and for this exercise we choose access from shell.
Cloud shell is access platform integrated into Oracle cloud and it comes with all basic installations and configuration to run cloud commands.
Copy the access information as shown on figure 7 and paste it to the cloud shell as below.
Now you have access to the OKE cluster created. In order to verify that lets run a command to get the node details.
This concludes the provisioning part of OKE cluster.
Step 2: Download application and prepare deployment
We’ll download and deploy Apache tomcat — a popular Java web container. Download file will save on a private space provided by the cloud shell.
In this exercise we’ll mount the application as a ‘configmap’. However, this method should not be use in production environments and using here only for the convenience.
Next we need to create ‘deployment manifest’ which describes the deployment details such as deployment label, service creation.etc. Oracle live labs suggested to create one ‘yaml’ file for the deployment and service creation. However, in my deployment it started giving unknown errors, so I split them into two files.
First file ‘deployment.yaml’ will do the deployment and second file ‘service.yaml’ will take care of creating the necessary services on OKE. Contents of the ‘deployment.yaml’ shown in figure 13.
Deployment can be carried out as below (Figure 14). This will do the application deployment on Kubernetes cluster.
Once that’s done we need to create services on OKE, so that users can access it. Figure 15 showing the yaml file which can assist on that.
Once service.yaml file is created we can create the services as below.
That’s it ! Now we can verify the deployment and services created as below. As you can see there’s deployment called ‘tomcat’ and service created with the name of ‘tomcat’ again.
Finally we need to verify the application we just deployed. The OKE cluster can be accessed via load balancer which is created along with OKE. You can find the public IP of load balancer and verify the deployment as;
http://<your_loadbalancer_ip_address>/sample
In conclusion, this article discussed the provisioning of the OKE cluster and deploying simple application on it. This is a reproduction of Oracle live labs exercise.