From 0f67976bb18e6ae68c97400e5ea84ef59d5acdfe Mon Sep 17 00:00:00 2001 From: Elamaran Shanmugam Date: Tue, 5 Mar 2024 10:50:32 -0500 Subject: [PATCH] Adding EKS Adon Example for Upbound --- examples/aws-provider/README.md | 31 ------------- examples/upbound-aws-provider/README.md | 46 +++++++++++++++++++ .../managed-resources/eks/eks-addon.yaml | 13 ++++++ .../eks}/eks-clusterauth.yaml | 0 4 files changed, 59 insertions(+), 31 deletions(-) create mode 100644 examples/upbound-aws-provider/managed-resources/eks/eks-addon.yaml rename examples/{aws-provider/managed-resources => upbound-aws-provider/managed-resources/eks}/eks-clusterauth.yaml (100%) diff --git a/examples/aws-provider/README.md b/examples/aws-provider/README.md index 945402a6..a5dcf9d8 100644 --- a/examples/aws-provider/README.md +++ b/examples/aws-provider/README.md @@ -41,37 +41,6 @@ kubectl apply -f managed-resources/vpc.yaml kubectl get VPC aws-provider-vpc ``` -## Authenticate with an existing EKS Cluster using AWS Provider - -The following shows an example of how to authenticate and retrieve `kubeconfig` from an existing remote EKS Cluster using AWS Provider - -```shell -# Please make sure to replace `` with your EKS cluster name in the below file before applying. -kubectl apply -f managed-resources/eks-clusterauth.yaml - -# Verify the resource. When authentication is complete, you should see READY: True in the output. -kubectl get clusterauths.eks.aws.upbound.io - -NAME READY SYNCED EXTERNAL-NAME AGE -eks-x86-us-east-2-1-28-blueprint True True eks-x86-us-east-2-1-28-blueprint 11d - -# Verify if the secret has pulled the `kubeconfig` of a remote cluster to management cluster. -kubectl describe secret eks-x86-us-east-2-1-28-eks-connection -n upbound-system - -Name: eks-x86-us-east-2-1-28-eks-connection -Namespace: upbound-system -Labels: -Annotations: - -Type: connection.crossplane.io/v1alpha1 - -Data -==== -clusterCA: 1107 bytes -endpoint: 72 bytes -kubeconfig: 4314 bytes -``` - ## Crossplane Kubernetes Provider The following example shows the creation of Namespace with Crossplane Kuberentes provider diff --git a/examples/upbound-aws-provider/README.md b/examples/upbound-aws-provider/README.md index 992e0259..a78f83c6 100644 --- a/examples/upbound-aws-provider/README.md +++ b/examples/upbound-aws-provider/README.md @@ -35,6 +35,52 @@ kubectl create -f managed-resources/s3/bucket.yaml kubectl get buckets ``` +## Authenticate with an existing EKS Cluster using upbound AWS Provider + +The following shows an example of how to authenticate and retrieve `kubeconfig` from an existing remote EKS Cluster using AWS Provider + +```shell +# Please make sure to replace `` with your EKS cluster name in the below file before applying. +kubectl apply -f managed-resources/eks/eks-clusterauth.yaml + +# Verify the resource. When authentication is complete, you should see READY: True in the output. +kubectl get clusterauths.eks.aws.upbound.io + +NAME READY SYNCED EXTERNAL-NAME AGE +eks-x86-us-east-2-1-28-blueprint True True eks-x86-us-east-2-1-28-blueprint 11d + +# Verify if the secret has pulled the `kubeconfig` of a remote cluster to management cluster. +kubectl describe secret eks-x86-us-east-2-1-28-eks-connection -n upbound-system + +Name: eks-x86-us-east-2-1-28-eks-connection +Namespace: upbound-system +Labels: +Annotations: + +Type: connection.crossplane.io/v1alpha1 + +Data +==== +clusterCA: 1107 bytes +endpoint: 72 bytes +kubeconfig: 4314 bytes +``` + +### Deploys an EKS Addon for Upbound AWS Provider + +The following shows an example of how to deploy an EKS Addon on an EKS Cluster from a management EKS Cluster using Upbound AWS Provider + +```shell +# Please make sure to replace `` with your EKS cluster name in the below file before applying. +kubectl create -f managed-resources/eks/eks-addon.yaml + +# Verify the resource. When provisioning is complete, you should see READY: True in the output +kubectl get addon.eks.aws.upbound.io -A + +NAME READY SYNCED EXTERNAL-NAME AGE +vpc-cni True True eks-x86-us-east-2-1-28-blueprint:vpc-cni 12d +``` + ## Deploy the examples - [sqs-lambda-s3](composite-resources/serverless-examples/sqs-lambda-s3/README.md) diff --git a/examples/upbound-aws-provider/managed-resources/eks/eks-addon.yaml b/examples/upbound-aws-provider/managed-resources/eks/eks-addon.yaml new file mode 100644 index 00000000..4eaf10b9 --- /dev/null +++ b/examples/upbound-aws-provider/managed-resources/eks/eks-addon.yaml @@ -0,0 +1,13 @@ +apiVersion: eks.aws.upbound.io/v1beta1 +kind: Addon +metadata: + annotations: + meta.upbound.io/example-id: eks/v1beta1/addon + name: vpc-cni +spec: + forProvider: + addonName: vpc-cni + clusterName: + region: eu-west-1 + providerConfigRef: + name: default diff --git a/examples/aws-provider/managed-resources/eks-clusterauth.yaml b/examples/upbound-aws-provider/managed-resources/eks/eks-clusterauth.yaml similarity index 100% rename from examples/aws-provider/managed-resources/eks-clusterauth.yaml rename to examples/upbound-aws-provider/managed-resources/eks/eks-clusterauth.yaml