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 a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.

CloudThat is the first Indian Company to win the prestigious Microsoft Partner 2024 Award and is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 850k+ professionals in 600+ cloud certifications and completed 500+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, Microsoft Gold Partner, AWS Training PartnerAWS Migration PartnerAWS Data and Analytics PartnerAWS DevOps Competency PartnerAWS GenAI Competency PartnerAmazon QuickSight Service Delivery PartnerAmazon EKS Service Delivery Partner AWS Microsoft Workload PartnersAmazon EC2 Service Delivery PartnerAmazon ECS Service Delivery PartnerAWS Glue Service Delivery PartnerAmazon Redshift Service Delivery PartnerAWS Control Tower Service Delivery PartnerAWS WAF Service Delivery PartnerAmazon CloudFront Service Delivery PartnerAmazon OpenSearch Service Delivery PartnerAWS DMS Service Delivery PartnerAWS Systems Manager Service Delivery PartnerAmazon RDS Service Delivery PartnerAWS CloudFormation Service Delivery PartnerAWS ConfigAmazon EMR and many more.

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!