CKAD, DevOps, Kubernetes

2 Mins Read

Ultimate Guide for Charmed Kubernetes Deployment on AWS with Juju

Voiced by Amazon Polly

Introduction

This ultimate technical guide delves into the streamlined process of deploying Charmed Kubernetes using Juju on the Amazon Web Services (AWS) cloud platform. Combining the user-friendly approach of Charmed Kubernetes with Juju’s ability to simplify complex application and service management, this guide presents an ideal solution for Kubernetes orchestration.

Prerequisites: Before diving into the deployment process, ensure you have the following prerequisites:

  • An AWS account with proper permissions to create resources.
  • Basic familiarity with the command-line interface.
  • Access to a terminal or command prompt.

Before starting with the setup Create an EC2 instance with the below configuration in any region:

  • Name “Jump Server”
  • Instance type “large”
  • AMI Ubuntu 22.04 LTS
  • The size of EBS at 20GB

Now SSH into the created Jump Server either using EC2-Connect or Putty/Mobaxterm , and follow the below steps:

AWS Media Services Excellence: Unleash Potential with Cloud Consulting

  • Embrace Innovation!
  • Transform your Media Capabilities
Consult Now

Step 1: Setting Up the Environment

  1. Set Hostname: Begin by configuring the hostname to the Juju server using the command
    sudo hostnamectl set-hostname juju-server
  2. Install Juju: Install Juju using Snap with the following command
    sudo snap install juju --channel=3.1/stable
  3. Prepare Environment: Create the necessary directory for Juju with

    mkdir -p ~/.local/share/juju/

Step 2: Configuring AWS Credentials

  1. Explore Available Clouds: List available clouds with Juju by executing juju clouds
  2. Add AWS Credentials: Add your AWS credentials by running

    juju add-credential aws

    Follow the prompts and enter the necessary information, including the credential name, region, access key, and secret key.

Step 3: Bootstrap Juju Controller on AWS

  1. Bootstrap Controller: Bootstrap the Juju controller on AWS using the following command

    juju bootstrap aws/us-west-1 my-controller --credential myaws

Step 4: Deploying Charmed Kubernetes

  1. Create Juju Model: Define a Juju model for the Kubernetes deployment

    juju add-model my-k8s --credential myaws aws/us-west-1
  2. Download Overlays: Obtain the required overlays for AWS integration wget
  3. Create Configuration File: Craft a k8s.yaml file with the specified configurations

    description: Charmed Kubernetes overlay.
    applications:
    kubernetes-worker:
    constraints: root-disk=20G
    num_units: 2
    kubernetes-control-plane:
    constraints: root-disk=20G
    num_units: 1
    etcd:
    constraints: root-disk=20G
    num_units: 1
    kubeapi-load-balancer:
    constraints: root-disk=20G
    num_units: 1
    easyrsa:
    constraints: root-disk=20G
    num_units: 1
  4. Deploy Kubernetes: Deploy Charmed Kubernetes with the configured overlays

    juju deploy charmed-kubernetes --channel 1.28/stable --overlay k8s.yaml --overlay aws-overlay.yaml --trust

Step 5: Accessing Kubernetes Cluster with Juju

  1. Install kubectl: Install kubectl on the Juju server for cluster management

    sudo snap install kubectl --classic
  2. Set Up kubeconfig: Copy kubeconfig from the Kubernetes Control Plane to the local Juju server

    juju ssh kubernetes-control-plane/0 -- sudo cat ~/.kube/config > ~/.kube/config
  3. Verify kubeconfig: Ensure the kubeconfig is correctly set up by running

    cat .kube/config
  4. Manage Kubernetes Cluster: Utilize kubectl commands to interact with the Kubernetes cluster seamlessly.

Conclusion

Juju offers powerful commands for dynamic scaling of Kubernetes clusters, providing flexibility and ease of management. By following this technical guide, deploying Charmed Kubernetes on AWS with Juju becomes a straightforward process, empowering users to efficiently orchestrate their containerized applications.

Expertly Migrate diverse Microsoft Workloads to AWS with CloudThat, Your Advanced AWS Migration Partner

  • Seamless Migration
  • Cost Optimization
  • Usage Efficiency
Talk to Expert

About CloudThat

Established in 2012, CloudThat is a leading Cloud Training and Cloud Consulting services provider in India, USA, Asia, Europe, and Africa. Being a pioneer in the cloud domain, CloudThat has special expertise in catering to mid-market and enterprise clients from all the major cloud service providers like AWS, Microsoft, GCP, VMware, Databricks, HP, and more. Uniquely positioned to be a single source for both training and consulting for cloud technologies like Cloud Migration, Data Platforms, DevOps, IoT, and the latest technologies like AI/ML, it is a top-tier partner with AWS and Microsoft, winning more than 8 awards combined in 11 years. Recently, it was recognized as the ‘Think Big’ partner from AWS and won the Microsoft Superstars FY 2023 award in Asia & India. Leveraging its position as a leader in the market, CloudThat has trained 650k+ professionals in 500+ cloud certifications and delivered 300+ consulting projects for 100+ corporates in 28+ countries.

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!