Skip to content

Commit

Permalink
Adding EKS Adon Example for Upbound
Browse files Browse the repository at this point in the history
  • Loading branch information
elamaran11 committed Mar 5, 2024
1 parent bd91d88 commit 0f67976
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 31 deletions.
31 changes: 0 additions & 31 deletions examples/aws-provider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<your-cluster-name>` 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: <none>
Annotations: <none>

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
Expand Down
46 changes: 46 additions & 0 deletions examples/upbound-aws-provider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<your-cluster-name>` 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: <none>
Annotations: <none>

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 `<your-cluster-name>` 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)
Expand Down
13 changes: 13 additions & 0 deletions examples/upbound-aws-provider/managed-resources/eks/eks-addon.yaml
Original file line number Diff line number Diff line change
@@ -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: <your-cluster-name>
region: eu-west-1
providerConfigRef:
name: default

0 comments on commit 0f67976

Please sign in to comment.