Note:

Manage OCI Kubernetes Engine with Different Capacity Types and Resolve Common Issues on Preemptible Nodes

Introduction

As we continue through each cycle of digital transformation, businesses continue to innovate and iterate, pushing the boundaries of what is possible for infrastructure, applications and management at scale. One of the more recent and widely adopted technologies used to support infrastructure and application management is Kubernetes. Before we dive further into Kubernetes, we must first look under the hood at the concept of containers.

Containers are a package of software including a collection of application specific code along with the necessary runtime and program libraries to support reliable execution of an application. Containers are configured to run within a user space inside the Operating System (OS) of the underlying server. This architecture allows for the decoupling of core services and dependencies lightweight deployment of an application. Benefits of application containerization include improvements in workload isolation, resource efficiency, scalability and fault tolerance.

To harness the power and efficiency of containers at scale, we need some sort of tooling to interface or manage our container-based deployments. Kubernetes, also known as K8s, is an open-source container orchestration tool that automates container deployment by creating a cluster of servers for which containers can be run, scaled and delivered to your users. The Kubernetes cluster architecture includes a master node (control plane), and multiple worker nodes. Each worker hosts a pod/s (collection of containers) which delivers your application.

Architecture

History on Kubernetes

Objectives

Prerequisites

How is Oracle Positioned with Container Technology?

OKE is a fully managed, scalable, and highly available Kubernetes service that helps customers to deploy containerized applications to the cloud. OKE gives OCI customers the ability to optimize compute resource utilization to meet unique workload requirements and quickly adapt as workload requirements change. OKE delivers a seamless customer experience giving customers unparalleled price-performance, resource efficiency, portability and reliability. OKE provides several key integrations with various container lifecycle management products including container registries, CI/CD frameworks, networking solutions, storage options, and top-notch security features.

In OKE, you can specify the cluster type as either basic or enhanced clusters. Basic clusters support all the core functionality provided by OKE. To enable further capabilities, enhanced clusters support all available features including virtual nodes, self-managed nodes, cluster add-on management, more granular Oracle Cloud Infrastructure Identity and Access Management (OCI IAM) configurations and so on.

OKE on Different Capacity Types

OKE Deployment with Preemptible and OnDemand Node Pools

OKE Deployment with preemptible

Known Issues with Preemptible

There are some known issues when using preemptible with OKE.

Task 1: Steps to Create E5 Preemptible OKE Worker Nodepool using Command Line Interface (CLI)

  1. Log in to the OCI Console and click the services menu.

  2. Navigate to Developer Services.

  3. Under Containers & Artifacts, click Click Kubernetes Engine (OKE).

  4. Click OCI Cloud shell to display the CLI.

  5. Edit node-pool OCID, compartment OCID, subnet-id, fault domain, configuration and size before running the following CLI commands in your tenancy.

    oci ce node-pool create 
    --cluster-id ocid1.cluster.oc1.iad.aaaaaaaaxlokvt2r25b6dmdxxxxxxxxxxxxxxxxxkhdilj7kpehc5vke2ve5gq
    --compartment-id ocid1.compartment.oc1..aaaaaaaaqufgrkgzr4zb3dxxxxxxxxxxxxxxxxxxp7jx7yckglghxppfrui6a 
    --name E5_Preemtible 
    --node-shape VM.Standard.E5.Flex 
    --placement-configs '[{"availabilityDomain": "FZyT:US-ASHBURN-AD-2", "preemptibleNodeConfig": {"preemptionAction":{"isPreserveBootVolume":true, "type": "TERMINATE"}}, "subnet-id": "ocid1.subnet.oc1.iad.aaaaaaaapmekowq4rqhu72xxxxxxxxxxxxxxxxxxxxtlkp4dmixebzhgrwdlmtteclq", "faultDomains":["FAULT-DOMAIN-1"]}]'
    --size 1 
    --node-image-id ocid1.image.oc1.iad.aaaaaaaajvtta4i5sq4xxxxxxxxxxxxxcskfxjwz4vwxz6ersmmax6q 
    --node-shape-config '{"memoryInGBs": 6.0, "ocpus": 1.0}'
    --pod-subnet-ids '["ocid1.subnet.oc1.iad.aaaaaaaapmekowq4rqhxxxxxxxxxxxxxxxkp4dmixebzhgrwdlmtteclq"]'
    

    This will output OCID of the work request for creating the node pool and create E5 preemptible worker node in the existing cluster as shown in the following image.

    E5 preemptible worker node

Acknowledgments

More Learning Resources

Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.

For product documentation, visit Oracle Help Center.