### Deploy Example Application Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/karpenter/README.md Command to apply an example deployment to the EKS cluster. This deployment can be used to test Karpenter's ability to provision EC2 instances when pods become unscheduled. ```sh kubectl apply --server-side -f example.yaml ``` -------------------------------- ### Before - v4.x Example Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/docs/v4-to-v5/addons.md Shows the module source and arguments used in v4.x of the EKS Blueprints Addons module. ```hcl module "eks_blueprints_addons" { source = "github.com/aws-ia/terraform-aws-eks-blueprints//modules/kubernetes-addons?ref=v4.32.1" eks_cluster_id = module.eks.cluster_name eks_cluster_endpoint = module.eks.cluster_endpoint eks_oidc_provider = module.eks.oidc_provider eks_cluster_version = module.eks.cluster_version # TODO } ``` -------------------------------- ### Initialize Terraform Modules Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/blue-green-upgrade/environment/README.md Run this command in the environment directory to download necessary providers and install Terraform modules. ```bash terraform init ``` -------------------------------- ### After - v5.x Example Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/docs/v4-to-v5/addons.md Illustrates the updated module source and arguments for v5.x of the EKS Blueprints Addons module, including new versioning. ```hcl module "eks_blueprints_addons" { source = "aws-ia/eks-blueprints-addons/aws" version = "~> 1.0" cluster_name = module.eks.cluster_name cluster_endpoint = module.eks.cluster_endpoint cluster_version = module.eks.cluster_version oidc_provider_arn = module.eks.oidc_provider_arn # TODO } ``` -------------------------------- ### Verify Initial ArgoCD Installation Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/gitops/multi-cluster-hub-spoke-argocd/README.md Check the status of ArgoCD components within the 'argocd' namespace on the hub cluster. This command verifies the initial installation before addon deployment. ```shell kubectl --context hub get all -n argocd ``` -------------------------------- ### Deploy and Verify Sample Application Source: https://context7.com/aws-ia/terraform-aws-eks-blueprints/llms.txt Apply Terraform to provision the EKS cluster, then deploy a sample application and verify its resources. This demonstrates the functionality of the Auto Mode setup. ```bash terraform apply # Deploy sample StatefulSet app using the amd64 NodePool kubectl create ns sample-app kubectl apply -n sample-app -f sample-app.yaml # Verify nodes, pods, PVCs, and ingress provisioned by Auto Mode kubectl get nodes,pods,pvc,ingress -n sample-app ``` -------------------------------- ### Scale Example Deployment Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/karpenter/README.md Command to scale the example deployment to a higher replica count. This action should trigger Karpenter to provision new EC2 nodes if necessary to accommodate the increased pod count. ```sh kubectl scale deployment inflate --replicas=3 ``` -------------------------------- ### v4.x EKS Blueprints Module Example Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/docs/v4-to-v5/teams.md This is an example of how the EKS Blueprints module was configured in v4.x. It serves as a reference for the 'before' state during migration. ```hcl module "eks_blueprints" { source = "github.com/aws-ia/terraform-aws-eks-blueprints?ref=v4.32.1" # TODO } ``` -------------------------------- ### Delete Example Application Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/bottlerocket/README.md Use kubectl to delete the example application deployment. This scales down the application to de-provision Karpenter Nodes. ```sh $ kubectl delete -f example.yaml deployment.apps "inflate" deleted ``` -------------------------------- ### Example vLLM Completion Response Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/multi-node-vllm/README.md This is an example of the expected JSON response from the vLLM completion endpoint. ```json { "id": "cmpl-48e678b2dacf4db9ac7f32dffa32c913", "object": "text_completion", "created": 1741483804, "model": "meta-llama/Llama-3.3-70B-Instruct", "choices": [ { "index": 0, "text": " top destination for travelers, with its", "logprobs": null, "finish_reason": "length", "stop_reason": null, "prompt_logprobs": null } ], "usage": { "prompt_tokens": 5, "total_tokens": 12, "completion_tokens": 7, "prompt_tokens_details": null } } ``` -------------------------------- ### Check Pods in Sample Namespace Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/istio/README.md List all running pods within the 'sample' namespace to verify deployments. This command is useful for confirming that application pods have started successfully. ```sh kubectl get pods -n sample ``` -------------------------------- ### State Move Command Example Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/docs/v4-to-v5/addons.md Provides an example Terraform state move command to help migrate external capacity providers under the new module structure. ```sh terraform state mv 'xxx' 'yyy' ``` -------------------------------- ### Delete Example Deployment Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/karpenter/README.md Command to delete the example deployment. This is a step in the cleanup process to de-provision resources created by Karpenter for this deployment. ```sh kubectl delete -f example.yaml ``` -------------------------------- ### View Envoy Sidecar Startup Script Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/vpc-lattice/cross-cluster-pod-communication/README.md Retrieves and displays the startup script for the Envoy sidecar proxy in cluster1, showing how it configures certificates and starts the Envoy process. ```bash kubectl --context eks-cluster1 exec -it deploy/demo-cluster1-v1 -c envoy-sigv4 -n apps -- cat /usr/local/bin/launch_envoy.sh ``` -------------------------------- ### v5.x EKS Blueprints Teams Module Example Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/docs/v4-to-v5/teams.md This is an example of the new EKS Blueprints Teams module configuration in v5.x. It shows the updated source and versioning for the new module. ```hcl module "eks_blueprints_teams" { source = "aws-ia/eks-blueprints-teams/aws" version = "~> 1.0" # TODO } ``` -------------------------------- ### Deploy Cached Pod Example Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/ml-container-cache/README.md Apply the `pod-cached.yaml` manifest to deploy a pod that utilizes a cached image. This is used to verify the reduced pod startup time. ```sh kubectl apply --server-side -f pod-cached.yaml ``` -------------------------------- ### General Deployment Workflow with Terraform Source: https://context7.com/aws-ia/terraform-aws-eks-blueprints/llms.txt Standard three-stage targeted apply for provisioning EKS clusters, addons, and workloads. Ensure prerequisites like awscli, kubectl, and terraform are installed and AWS credentials are configured. ```bash # Prerequisites: awscli, kubectl, terraform installed and AWS credentials configured git clone https://github.com/aws-ia/terraform-aws-eks-blueprints.git cd patterns/ # Stage 1: provision the VPC terraform init terraform apply -target="module.vpc" -auto-approve # Stage 2: provision the EKS cluster (control plane + node groups) terraform apply -target="module.eks" -auto-approve # Stage 3: provision addons and workloads terraform apply -auto-approve # Update local kubeconfig (most patterns output this command directly) aws eks --region us-west-2 update-kubeconfig --name # Verify nodes are ready kubectl get nodes ``` -------------------------------- ### Configure Terraform Variables Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/blue-green-upgrade/README.md Copy the example Terraform variables file and create symbolic links for each environment (environment, eks-blue, eks-green). Update the region, hosted_zone_name, and eks_admin_role_name as needed. ```shell cp terraform.tfvars.example terraform.tfvars ln -s ../terraform.tfvars environment/terraform.tfvars ln -s ../terraform.tfvars eks-blue/terraform.tfvars ln -s ../terraform.tfvars eks-green/terraform.tfvars ``` -------------------------------- ### Install Istio Observability Add-ons Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/istio/README.md Apply the YAML configurations for Istio's observability add-ons, including Kiali, Jaeger, Prometheus, and Grafana. This command iterates through a list of add-ons and applies their respective configurations. ```sh for ADDON in kiali jaeger prometheus grafana do ADDON_URL="https://raw.githubusercontent.com/istio/istio/release-1.20/samples/addons/$ADDON.yaml" kubectl apply --server-side -f $ADDON_URL done ``` -------------------------------- ### Deploy Uncached Pod Example Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/ml-container-cache/README.md Apply the `pod-uncached.yaml` manifest to deploy a pod that does not use a cached image. This serves as a baseline to contrast with the cached pod's startup time. ```sh kubectl apply --server-side -f pod-uncached.yaml ``` -------------------------------- ### Configure Kubernetes, Helm, and Kubectl Providers with Exec() Method Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/docs/faq.md Configure Kubernetes, Helm, and Kubectl providers to use the exec() method for authentication. This requires the awscli to be installed locally and supports dynamic token fetching. ```hcl provider "kubernetes" { host = module.eks.cluster_endpoint cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data) exec { api_version = "client.authentication.k8s.io/v1beta1" command = "aws" # This requires the awscli to be installed locally where Terraform is executed args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name] } } provider "helm" { kubernetes { host = module.eks.cluster_endpoint cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data) exec { api_version = "client.authentication.k8s.io/v1beta1" command = "aws" # This requires the awscli to be installed locally where Terraform is executed args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name] } } } provider "kubectl" { apply_retry_count = 5 host = module.eks.cluster_endpoint cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data) load_config_file = false exec { api_version = "client.authentication.k8s.io/v1beta1" command = "aws" # This requires the awscli to be installed locally where Terraform is executed args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name] } } ``` -------------------------------- ### Get Velero Backup Location Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/stateful/README.md Use the Velero CLI to retrieve information about configured backup locations. Ensure Velero CLI is installed and configured. ```bash velero backup-location get # Output should look similar to below NAME PROVIDER BUCKET/PREFIX PHASE LAST VALIDATED ACCESS MODE DEFAULT default aws velero-ss1wm44hv1fzb32d Available 2022-05-22 10:53:26 -0400 EDT ReadWrite true ``` -------------------------------- ### Configure AWS CLI for SSO Profile Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/sso-iam-identity-center/README.md Example output for configuring an AWS CLI profile for SSO access to an EKS cluster. This process involves setting up session details, start URL, region, and scopes. After configuration, use the specified profile with AWS CLI commands. ```bash configure_sso_admin = < SSO start URL [None]: https://d-123456789012.awsapps.com/start SSO region [None]: us-west-2 SSO registration scopes [sso:account:access]: Attempting to automatically open the SSO authorization page in your default browser. If the browser does not open or you wish to use a different device to authorize this request, open the following URL: https://device.sso.us-west-2.amazonaws.com/ Then enter the code: The only AWS account available to you is: 123456789012 Using the account ID 123456789012 The only role available to you is: EKSClusterAdmin Using the role name EKSClusterAdmin CLI default client Region [us-west-2]: us-west-2 CLI default output format [json]: json CLI profile name [EKSClusterAdmin-123456789012]: To use this profile, specify the profile name using --profile, as shown: # aws eks --region us-west-2 update-kubeconfig --name iam-identity-center --profile EKSClusterAdmin EOT ``` -------------------------------- ### Install tcpdump Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/wireguard-with-cilium/README.md Install the tcpdump utility inside the Cilium container to capture network traffic. ```sh apt-get update apt-get install -y tcpdump ``` -------------------------------- ### Verify Instance Store Mounts with nvme-cli Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/stateful/README.md Install the `nvme-cli` tool and use `nvme list` to identify instance store volumes. This is crucial for instances launched with instance stores to ensure they are mounted correctly. Access the instance via SSM Session Manager for execution. ```bash # Install the nvme-cli tool sudo yum install nvme-cli -y # Show NVMe volumes attached sudo nvme list ``` ```text # Notice the model is `EC2 NVMe Instance Storage` for the instance store Node SN Model Namespace Usage Format FW Rev /dev/nvme0n1 vol0546d3c3b0af0bf6d Amazon Elastic Block Store 1 25.77 GB / 25.77 GB 512 B + 0 B 1.0 /dev/nvme1n1 AWS24BBF51AF55097008 Amazon EC2 NVMe Instance Storage 1 75.00 GB / 75.00 GB 512 B + 0 B 0 ``` ```bash # Show disks, their partitions and mounts sudo lsblk ``` ```text # Output should look like below NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT nvme0n1 259:0 0 24G 0 disk ├─nvme0n1p1 259:2 0 24G 0 part / └─nvme0n1p128 259:3 0 1M 0 part vme1n1 259:1 0 69.9G 0 disk /local1 # <--- this is the instance store ``` -------------------------------- ### Deploy Sample Application Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/eks-automode/automode-custom-nodepools/README.md Deploy a sample application to validate the custom NodePools. This application provisions nodes, EBS volumes, and an ALB. ```bash kubectl create ns sample-app kubectl apply -n sample-app -f sample-app.yaml ``` -------------------------------- ### Deploy Helloworld Application with Istio Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/istio/README.md Define and deploy a sample 'helloworld' application using Kubernetes manifests. This includes a Service and a Deployment, intended for use within an Istio-enabled namespace. ```yaml apiVersion: v1 kind: Service metadata: name: helloworld labels: app: helloworld service: helloworld spec: ports: - port: 5000 name: http selector: app: helloworld --- apiVersion: apps/v1 kind: Deployment metadata: name: helloworld-v1 labels: app: helloworld version: v1 spec: replicas: 1 selector: matchLabels: app: helloworld version: v1 template: metadata: labels: app: helloworld version: v1 spec: containers: - name: helloworld image: docker.io/istio/examples-helloworld-v1 resources: requests: cpu: "100m" imagePullPolicy: IfNotPresent #Always ports: - containerPort: 5000 ``` -------------------------------- ### Clone Repository and Navigate Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/blue-green-upgrade/README.md Clone the EKS Blueprints repository and navigate to the blue-green upgrade pattern directory. ```bash git clone https://github.com/aws-ia/terraform-aws-eks-blueprints.git cd patterns/blue-green-upgrade/ ``` -------------------------------- ### ExternalDNS Controller Debug Log Example Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/blue-green-upgrade/README.md Example debug log output from the ExternalDNS controller, showing a skipped endpoint due to owner ID mismatch between clusters. ```log time="2022-10-10T15:46:54Z" level=debug msg="Skipping endpoint skiapp.eks-blueprint.sallaman.people.aws.dev 300 IN CNAME eks-blueprint-green k8s-riker-68438cd99f-893407990.eu-west-1.elb.amazonaws.com [{aws/evaluate-target-health true} {alias true} {aws/weight 100}] because owner id does not match, found: \"eks-blueprint-green\", required: \"eks-blueprint-blue\" time="2022-10-10T15:46:54Z" level=debug msg="Refreshing zones list cache" ``` -------------------------------- ### Deploy Sample Game Server using kubectl Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/agones-game-controller/README.md Use kubectl to create a sample game server configuration. This deploys a basic game server to your EKS cluster. ```sh kubectl create -f https://raw.githubusercontent.com/googleforgames/agones/release-1.32.0/examples/simple-game-server/gameserver.yaml ``` -------------------------------- ### ArgoCD AWS Auth Config Example Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/gitops/multi-cluster-hub-spoke-argocd/README.md An example JSON structure for Argo CD's AWS authentication configuration, showing `clusterName` and `roleARN` which are crucial for cross-cluster authentication. ```json { "tlsClientConfig": { "insecure": false, "caData" : "LS0tL...." }, "awsAuthConfig" : { "clusterName": "hub-spoke-dev", "roleARN": "arn:aws:iam::0123456789:role/hub-spoke-dev-argocd-spoke" } } ``` -------------------------------- ### Initialize and Apply Terraform for CloudFormation Template Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/kubecost/README.md Navigate to the 'run-me-in-24h/' directory and apply the Terraform configuration to set up the CloudFormation template for the CUR. ```sh cd run-me-in-24h/ terraform init terraform apply --auto-approve ``` -------------------------------- ### Initialize and Apply Terraform Configuration Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/docs/getting-started.md Use these commands to initialize Terraform, provision the VPC and EKS modules, and then apply the main configuration. Targeted applies are used for modular provisioning. ```sh terraform init terraform apply -target="module.vpc" -auto-approve terraform apply -target="module.eks" -auto-approve terraform apply -auto-approve ``` -------------------------------- ### Validate Sample Application Deployment Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/eks-automode/automode-custom-nodepools/README.md Verify the deployment of the sample application by checking nodes, pods, PVCs, and ingress resources within the 'sample-app' namespace. ```bash $ kubectl get nodes,pods,pvc,ingress -n sample-app NAME STATUS ROLES AGE VERSION node/i-08347a1b1ae4f01c4 Ready 13m v1.31.4-eks-0f56d01 NAME READY STATUS RESTARTS AGE pod/httpd-0 1/1 Running 0 13m pod/httpd-1 1/1 Running 0 12m NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS VOLUMEATTRIBUTESCLASS AGE persistentvolumeclaim/httpd-logs-httpd-0 Bound pvc-8eec1429-850a-4b7c-bc78-cd399d583091 10Gi RWO auto-ebs-sc 18m persistentvolumeclaim/httpd-logs-httpd-1 Bound pvc-d86f1913-49fd-4a3f-b7a5-01da69e3ac20 10Gi RWO auto-ebs-sc 12m NAME CLASS HOSTS ADDRESS PORTS AGE ingress.networking.k8s.io/httpd-ingress alb * k8s-sampleap-httpding-58bda13bc0-763023517.us-east-1.elb.amazonaws.com 80 13m ``` -------------------------------- ### Get Fargate Fluentbit ConfigMap Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/fargate-serverless/README.md Verify the 'aws-logging' configMap for Fargate Fluentbit was created in the 'aws-observability' namespace. ```sh kubectl -n aws-observability get configmap aws-logging ``` -------------------------------- ### List Velero Resources Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/stateful/README.md Run this command to list all Velero resources in the `velero` namespace. This helps confirm that Velero pods, services, and deployments are running correctly. ```bash kubectl get all -n velero ``` ```text # Output should look similar to below NAME READY STATUS RESTARTS AGE pod/velero-b4d8fd5c7-5smp6 1/1 Running 0 112s NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/velero ClusterIP 172.20.217.203 8085/TCP 114s NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/velero 1/1 1 1 114s NAME DESIRED CURRENT READY AGE replicaset.apps/velero-b4d8fd5c7 1 1 1 114s ``` -------------------------------- ### Apply EFA Info Test Manifest Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/nvidia-gpu-efa/README.md Apply the generated `efa-info-test.yaml` manifest to your EKS cluster to start the EFA test. ```bash kubectl apply --server-side -f ./efa-info-test.yaml ``` -------------------------------- ### Initialize and Apply Terraform Configuration Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/istio/README.md Use these commands to initialize your Terraform working directory and apply the configuration to deploy the EKS cluster with Istio. ```sh terraform init terraform apply --auto-approve ``` -------------------------------- ### Retrieve Application URL Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/gitops/getting-started-argocd/README.md Get the hostname of the load balancer assigned to the application's ingress resource to access it in a web browser. ```shell echo "Application URL: http://$(kubectl get -n game-2048 ingress game-2048 -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')" ``` -------------------------------- ### EKS Cluster Configuration (v4.32) Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/docs/v4-to-v5/cluster.md Example of how an EKS cluster was configured using the EKS Blueprints module in version v4.32. This configuration is now deprecated. ```hcl module "eks" { source = "github.com/aws-ia/terraform-aws-eks-blueprints?ref=v4.32.1" cluster_name = local.name cluster_version = "1.26" vpc_id = module.vpc.vpc_id private_subnet_ids = module.vpc.private_subnets cluster_endpoint_private_access = true map_roles = [ { rolearn = data.aws_caller_identity.current.arn username = "me" groups = ["system:masters"] }, ] managed_node_groups = { managed = { node_group_name = "managed" instance_types = ["m5.large"] min_size = 1 max_size = 2 desired_size = 1 k8s_labels = { Which = "managed" } } } fargate_profiles = { fargate = { fargate_profile_name = "fargate" fargate_profile_namespaces = [{ namespace = "default" k8s_labels = { Which = "fargate" } }] subnet_ids = module.vpc.private_subnets } } self_managed_node_groups = { self_managed = { node_group_name = "self_managed" instance_type = "m5.large" launch_template_os = "amazonlinux2eks" min_size = 1 max_size = 2 desired_size = 1 k8s_labels = { Which = "self-managed" } } } tags = { Blueprint = local.name GithubRepo = "github.com/aws-ia/terraform-aws-eks-blueprints" } } ``` -------------------------------- ### Retrieve ArgoCD Access Details Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/gitops/multi-cluster-hub-spoke-argocd/README.md Get the necessary commands to access the ArgoCD UI or CLI. This includes the username, password, and URL for the ArgoCD server. ```shell terraform output -raw access_argocd ``` -------------------------------- ### Initialize and Apply Blue Cluster Stack Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/blue-green-upgrade/README.md Initialize Terraform for the 'eks-blue' environment and apply the cluster stack. This step can take a significant amount of time. ```bash cd eks-blue terraform init terraform apply ``` -------------------------------- ### Get Game Server Status with kubectl Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/agones-game-controller/README.md Check the status of deployed game servers using kubectl. This command lists all GameServer resources in the cluster. ```sh kubectl get gs ``` -------------------------------- ### Deploy Workloads with Argo CD Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/gitops/getting-started-argocd/README.md Apply the sample application configuration to your Kubernetes cluster using kubectl. ```shell kubectl apply --server-side -f bootstrap/workloads.yaml ``` -------------------------------- ### Deploy Sample Application to EKS Spoke Clusters Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/gitops/multi-cluster-hub-spoke-argocd/README.md Applies a Kubernetes manifest file from the hub cluster context to deploy a sample application to all connected spoke clusters. ```shell kubectl --context hub apply -n argocd -f ../hub/bootstrap/workloads.yaml ``` -------------------------------- ### Port-forward Jaeger for Istio Traces Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/istio/README.md Use kubectl port-forward to access the Jaeger UI for visualizing application traces. Ensure Istio is installed in the 'istio-system' namespace. ```sh kubectl port-forward svc/jaeger 16686:16686 -n istio-system ``` -------------------------------- ### Initialize and Apply Terraform Configuration Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/ecr-pull-through-cache/README.md Initialize the Terraform working directory and apply the configuration, providing necessary Docker credentials as a variable. Ensure prerequisites are met before applying. ```sh terraform init terraform apply -var='docker_secret={"username":"your-docker-username", "accessToken":"your-docker-password"}' ``` -------------------------------- ### Port-forward Grafana for Istio Metrics Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/istio/README.md Use kubectl port-forward to access the Grafana dashboard for visualizing Istio metrics. Ensure Istio is installed in the 'istio-system' namespace. ```sh kubectl port-forward svc/grafana 3000:3000 -n istio-system ``` -------------------------------- ### EFA NCCL Test Output Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/nvidia-gpu-efa/README.md Example output from the EFA NCCL all_reduce_perf test, showing network bandwidth measurements for various data sizes and types. ```text ... [1,0]:# out-of-place in-place [1,0]:# size count type redop root time algbw busbw #wrong time algbw busbw #wrong [1,0]:# (B) (elements) (us) (GB/s) (GB/s) (us) (GB/s) (GB/s) [1,0]: 8 2 float sum -1 87.96 0.00 0.00 0 78.05 0.00 0.00 0 [1,0]: 16 4 float sum -1 76.83 0.00 0.00 0 77.15 0.00 0.00 0 [1,0]: 32 8 float sum -1 77.37 0.00 0.00 0 75.38 0.00 0.00 0 [1,0]: 64 16 float sum -1 77.60 0.00 0.00 0 79.80 0.00 0.00 0 [1,0]: 128 32 float sum -1 77.20 0.00 0.00 0 77.78 0.00 0.00 0 [1,0]: 256 64 float sum -1 78.46 0.00 0.01 0 80.39 0.00 0.01 0 [1,0]: 512 128 float sum -1 77.56 0.01 0.01 0 78.00 0.01 0.01 0 [1,0]: 1024 256 float sum -1 76.98 0.01 0.02 0 78.52 0.01 0.02 0 [1,0]: 2048 512 float sum -1 77.92 0.03 0.05 0 78.64 0.03 0.05 0 [1,0]: 4096 1024 float sum -1 83.26 0.05 0.09 0 83.16 0.05 0.09 0 [1,0]: 8192 2048 float sum -1 88.46 0.09 0.17 0 86.32 0.09 0.18 0 [1,0]: 16384 4096 float sum -1 97.22 0.17 0.32 0 94.82 0.17 0.32 0 [1,0]: 32768 8192 float sum -1 98.84 0.33 0.62 0 99.85 0.33 0.62 0 [1,0]: 65536 16384 float sum -1 101.1 0.65 1.22 0 96.80 0.68 1.27 0 [1,0]: 131072 32768 float sum -1 100.5 1.30 2.44 0 99.13 1.32 2.48 0 [1,0]: 262144 65536 float sum -1 104.5 2.51 4.70 0 102.2 2.57 4.81 0 [1,0]: 524288 131072 float sum -1 108.8 4.82 9.04 0 109.8 4.78 8.96 0 [1,0]: 1048576 262144 float sum -1 119.1 8.81 16.51 0 121.5 8.63 16.18 0 [1,0]: 2097152 524288 float sum -1 145.8 14.39 26.97 0 144.7 14.49 27.17 0 [1,0]: 4194304 1048576 float sum -1 163.2 25.70 48.19 0 162.4 25.82 48.42 0 [1,0]: 8388608 2097152 float sum -1 197.9 42.38 79.46 0 197.9 42.39 79.48 0 [1,0]: 16777216 4194304 float sum -1 282.3 59.43 111.43 0 290.3 57.79 108.35 0 ``` -------------------------------- ### VPC Lattice IAMAuthPolicy Configuration Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/vpc-lattice/cross-cluster-pod-communication/README.md Shows an example IAMAuthPolicy JSON configuration that allows access based on principal tags for cluster name and Kubernetes namespace. ```json { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::12345678910:root" }, "Action": "vpc-lattice-svcs:Invoke", "Resource": "*", "Condition": { "StringEquals": { "aws:PrincipalTag/eks-cluster-name": "eks-cluster2", "aws:PrincipalTag/kubernetes-namespace": "apps" } } } ] } ``` -------------------------------- ### List Istio System and Ingress Pods and Services Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/istio/README.md Verify the deployment of Istio components by listing pods and services in the 'istio-system' and 'istio-ingress' namespaces. This helps confirm that all Istio-related resources are running as expected. ```sh kubectl get pods,svc -n istio-system kubectl get pods,svc -n istio-ingress ``` -------------------------------- ### Scale Deployment and Observe Node Provisioning Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/bottlerocket/README.md Scale a deployment to trigger Karpenter to provision a new node. Then, check the pods and nodes to confirm the new node with Bottlerocket OS is provisioned. ```sh $ kubectl scale deployment inflate --replicas 10 deployment.apps/inflate scaled $ kubectl get pods -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES inflate-7849c696cd-2668t 1/1 Running 0 49s 10.0.34.254 ip-10-0-45-41.us-west-2.compute.internal inflate-7849c696cd-5wffm 1/1 Running 0 49s 10.0.46.13 ip-10-0-45-41.us-west-2.compute.internal inflate-7849c696cd-8x5ws 1/1 Running 0 49s 10.0.35.190 ip-10-0-45-41.us-west-2.compute.internal inflate-7849c696cd-9nhvr 1/1 Running 0 49s 10.0.42.99 ip-10-0-45-41.us-west-2.compute.internal inflate-7849c696cd-cbr5q 1/1 Running 0 49s 10.0.35.195 ip-10-0-45-41.us-west-2.compute.internal inflate-7849c696cd-jcr7r 1/1 Running 0 49s 10.0.33.41 ip-10-0-45-41.us-west-2.compute.internal inflate-7849c696cd-nhjt4 1/1 Running 0 49s 10.0.35.213 ip-10-0-45-41.us-west-2.compute.internal inflate-7849c696cd-p9j7x 1/1 Running 0 49s 10.0.43.102 ip-10-0-45-41.us-west-2.compute.internal inflate-7849c696cd-qr7th 1/1 Running 0 49s 10.0.37.221 ip-10-0-45-41.us-west-2.compute.internal inflate-7849c696cd-rzjzr 1/1 Running 0 49s 10.0.33.210 ip-10-0-45-41.us-west-2.compute.internal $ kubect get nodes NAME STATUS ROLES AGE VERSION ip-10-0-2-29.us-west-2.compute.internal Ready 90m v1.30.1-eks-e564799 ip-10-0-26-48.us-west-2.compute.internal Ready 90m v1.30.0-eks-fff26e3 ip-10-0-43-187.us-west-2.compute.internal Ready 90m v1.30.0-eks-fff26e3 ip-10-0-45-41.us-west-2.compute.internal Ready 60s v1.30.1-eks-e564799 $ kubectl describe node ip-10-0-45-41.us-west-2.compute.internal | grep Image OS Image: Bottlerocket OS 1.20.4 (aws-k8s-1.30) ``` -------------------------------- ### Get ArgoCD UI Load Balancer Hostname Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/blue-green-upgrade/README.md Retrieve the hostname for the ArgoCD server service using kubectl and jq. This is needed to access the ArgoCD UI. ```bash kubectl get svc -n argocd argo-cd-argocd-server -o json | jq '.status.loadBalancer.ingress[0].hostname' -r ``` -------------------------------- ### Get EKS Deployment Information Source: https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/patterns/blue-green-upgrade/README.md This command retrieves the status of deployments for a specific application within a namespace. It helps in monitoring the deployment's readiness and availability. ```bash kubectl get deployment -n team-burnham -l app=burnham ```