Skip to content

NimTechnology

Trình bày các công nghệ CLOUD một cách dễ hiểu.

  • Kubernetes & Container
    • Docker
    • Kubernetes
      • Ingress
      • Pod
    • Helm Chart
    • OAuth2 Proxy
    • Isito-EnvoyFilter
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Vault
    • Longhorn – Storage
    • VictoriaMetrics
    • MetalLB
    • Kong Gateway
  • CI/CD
    • ArgoCD
    • ArgoWorkflows
    • Argo Events
    • Spinnaker
    • Jenkins
    • Harbor
    • TeamCity
    • Git
      • Bitbucket
  • Coding
    • DevSecOps
    • Terraform
      • GCP – Google Cloud
      • AWS – Amazon Web Service
      • Azure Cloud
    • Golang
    • Laravel
    • Python
    • Jquery & JavaScript
    • Selenium
  • Log, Monitor & Tracing
    • DataDog
    • Prometheus
    • Grafana
    • ELK
      • Kibana
      • Logstash
  • BareMetal
    • NextCloud
  • Toggle search form

EKS Crossplane

Posted on March 10, 2025March 10, 2025 By nim No Comments on EKS Crossplane

Creator: https://github.com/trungvo11

Crossplane is an open-source project in the Cloud Native Computing Foundation (CNCF) that transforms your Kubernetes cluster into a universal control plane. It enables platform teams to assemble infrastructure from multiple vendors and expose higher-level self-service APIs for application teams to consume, without writing any code.

Crossplane extends your Kubernetes cluster to support orchestrating any infrastructure or managed service. It allows you to compose Crossplane’s granular resources into higher-level abstractions that can be versioned, managed, deployed, and consumed using your favorite tools and existing processes.

Crossplane on AWS EKS

Crossplane Docs · master · Install Crossplane

upbound/provider-family-aws@v1.20.1 | Upbound Marketplace

GitHub – crossplane-contrib/provider-upjet-aws: AWS Provider for Crossplane.

crossplane/cluster/charts/crossplane at main · crossplane/crossplane

provider-aws/examples/ec2 at master · crossplane-contrib/provider-aws

Steps

  1. Provision the EKS Cluster
  2. Install Crossplane Using Helm

Add the Crossplane Helm repository and install Crossplane.

helm repo add crossplane-stable https://charts.crossplane.io/stable
helm repo update
helm install crossplane crossplane-stable/crossplane --namespace crossplane-system --create-namespace

3. Verify Crossplane Installation

kubectl get pods -n crossplane-system
kubectl api-resources | grep crossplane

4. Install AWS Provider for Crossplane

https://marketplace.upbound.io/providers/upbound/provider-family-aws/v1.20.1

apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
  name: provider-aws-docdb
spec:
  package: xpkg.upbound.io/upbound/provider-aws-docdb:v1
---
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
  name: provider-aws-ec2
spec:
  package: xpkg.upbound.io/upbound/provider-aws-ec2:v1

5. Verify Provider Installation

kubectl get providers

6. Create a Kubernetes secret for AWS

credentials.txt

aws_access_key_id = YOUR_ACCESS_KEY_ID
aws_secret_access_key = YOUR_SECRET_ACCESS_KEY
kubectl create secret generic aws-secret -n crossplane-system --from-file=creds=credential.txt

7. Create a ProviderConfig

apiVersion: aws.upbound.io/v1beta1
kind: ProviderConfig
metadata:
  name: default
spec:
  credentials:
    source: Secret
    secretRef:
      namespace: crossplane-system
      name: aws-secret
      key: creds

8. Create a managed resource in AWS

# Security Group
apiVersion: ec2.aws.upbound.io/v1beta1
kind: SecurityGroup
metadata:
  name: documentdb-security-group
spec:
  forProvider:
    region: ap-southeast-1
    vpcId: vpc-076d9083e381d0fb7
    description: Enable documentdb access
  providerConfigRef:
    name: default
---
# Ingress Rule
apiVersion: ec2.aws.upbound.io/v1beta1
kind: SecurityGroupRule
metadata:
  name: documentdb-ingress
spec:
  forProvider:
    region: ap-southeast-1
    type: ingress
    fromPort: 27017
    toPort: 27017
    protocol: "tcp"
    cidrBlocks:
      - "10.0.0.0/8"
    securityGroupIdRef:
      name: documentdb-security-group
  providerConfigRef:
    name: default
---
# Egress Rule
apiVersion: ec2.aws.upbound.io/v1beta1
kind: SecurityGroupRule
metadata:
  name: documentdb-egress
spec:
  forProvider:
    region: ap-southeast-1
    type: egress
    fromPort: -1
    toPort: -1
    protocol: "-1"
    cidrBlocks:
      - "0.0.0.0/0"
    securityGroupIdRef:
      name: documentdb-security-group
  providerConfigRef:
    name: default

9. Get buckets created using Crossplane

kubectl get SecurityGroup
kubectl describe SecurityGroup

10. Delete managed resource from AWS

kubectl delete ...

AWS - Amazon Web Service, Kubernetes

Post navigation

Previous Post: [Golang / EKS] Accessing AWS EKS with Go: A Comprehensive Guide to Interacting with Kubernetes APIs
Next Post: [OpenVPN] renew certificate for OpenVPN

More Related Articles

[aws] AWS refund AWS - Amazon Web Service
[eks] Kubernetes Cluster-AutoScaler error: Failed to watch *v1.CSIDriver AWS - Amazon Web Service
[Redis] ElastiCache-Redis Cross-Region Replication|Global DataStore AWS - Amazon Web Service
[Terraform] – Terraform Beginner – Lesson 9: Terraform with AWS – part 2 AWS - Amazon Web Service
[kubectl/helm] invalid apiVersion “client.authentication.k8s.io/v1alpha1” Helm Chart
[Terraform] ResourceAlreadyExistsException: The specified log group already exists AWS - Amazon Web Service

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Tham Gia Group DevOps nhé!
Để Nim có nhiều động lực ra nhiều bài viết.
Để nhận được những thông báo mới nhất.

Recent Posts

  • [Azure] The subscription is not registered to use namespace ‘Microsoft.ContainerService’ May 8, 2025
  • [Azure] Insufficient regional vcpu quota left May 8, 2025
  • [WordPress] How to add a Dynamic watermark on WordPress. May 6, 2025
  • [vnet/Azure] VNet provisioning via Terraform. April 28, 2025
  • [tracetcp] How to perform a tracert command using a specific port. April 3, 2025

Archives

  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021

Categories

  • BareMetal
    • NextCloud
  • CI/CD
    • Argo Events
    • ArgoCD
    • ArgoWorkflows
    • Git
      • Bitbucket
    • Harbor
    • Jenkins
    • Spinnaker
    • TeamCity
  • Coding
    • DevSecOps
    • Golang
    • Jquery & JavaScript
    • Laravel
    • NextJS 14 & ReactJS & Type Script
    • Python
    • Selenium
    • Terraform
      • AWS – Amazon Web Service
      • Azure Cloud
      • GCP – Google Cloud
  • Kubernetes & Container
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Docker
    • Helm Chart
    • Isito-EnvoyFilter
    • Kong Gateway
    • Kubernetes
      • Ingress
      • Pod
    • Longhorn – Storage
    • MetalLB
    • OAuth2 Proxy
    • Vault
    • VictoriaMetrics
  • Log, Monitor & Tracing
    • DataDog
    • ELK
      • Kibana
      • Logstash
    • Fluent
    • Grafana
    • Prometheus
  • Uncategorized
  • Admin

Copyright © 2025 NimTechnology.