Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Kubernetes in Production Best Practices

You're reading from   Kubernetes in Production Best Practices Build and manage highly available production-ready Kubernetes clusters

Arrow left icon
Product type Paperback
Published in Mar 2021
Publisher Packt
ISBN-13 9781800202450
Length 292 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Aly Saleh Aly Saleh
Author Profile Icon Aly Saleh
Aly Saleh
Murat Karslioglu Murat Karslioglu
Author Profile Icon Murat Karslioglu
Murat Karslioglu
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Chapter 1: Introduction to Kubernetes Infrastructure and Production-Readiness 2. Chapter 2: Architecting Production-Grade Kubernetes Infrastructure FREE CHAPTER 3. Chapter 3: Provisioning Kubernetes Clusters Using AWS and Terraform 4. Chapter 4: Managing Cluster Configuration with Ansible 5. Chapter 5: Configuring and Enhancing Kubernetes Networking Services 6. Chapter 6: Securing Kubernetes Effectively 7. Chapter 7: Managing Storage and Stateful Applications 8. Chapter 8: Deploying Seamless and Reliable Applications 9. Chapter 9: Monitoring, Logging, and Observability 10. Chapter 10: Operating and Maintaining Efficient Kubernetes Clusters 11. Other Books You May Enjoy

Deploying the security configurations

The following instructions will deploy the cluster's Ansible playbook, and it will deploy the security add-ons and configuration to the cluster:

  1. Initialize the Terraform state and select the workspace by running the following commands:
    $ cd terraform/packtclusters
    $ terraform workspace select prod1
  2. Retrieve and configure kubeconfig for the target cluster:
    $ aws eks --region $(terraform output aws_region) update-kubeconfig --name $(terraform output cluster_full_name)
  3. Execute the Ansible playbook:
    $ source ~/ansible/bin/activate
    $ ansible-playbook -i \
    ../../ansible/inventories/packtclusters/ \
    -e "worker_iam_role_arn=$(terraform output worker_iam_role_arn) \
    cluster_name=$(terraform output cluster_full_name)
    aws_default_region=$(terraform output aws_region)" \
    ../../ansible/cluster.yaml
  4. You will get the following output following successful Ansible execution:

    Figure 6.2 – Ansible execution output

  5. Execute...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image