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

CloudThat is an award-winning company and the first in India to offer cloud training and consulting services worldwide. As a Microsoft Solutions Partner, AWS Advanced Tier Training Partner, and Google Cloud Platform Partner, CloudThat has empowered over 850,000 professionals through 600+ cloud certifications winning global recognition for its training excellence including 20 MCT Trainers in Microsoft’s Global Top 100 and an impressive 12 awards in the last 8 years. CloudThat specializes in Cloud Migration, Data Platforms, DevOps, IoT, and cutting-edge technologies like Gen AI & AI/ML. It has delivered over 500 consulting projects for 250+ organizations in 30+ countries as it continues to empower professionals and enterprises to thrive in the digital-first world.

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!