All Projects → aws → aws-cloud-map-mcs-controller-for-k8s

aws / aws-cloud-map-mcs-controller-for-k8s

Licence: Apache-2.0 license
K8s controller implementing Multi-Cluster Services API based on AWS Cloud Map.

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to aws-cloud-map-mcs-controller-for-k8s

kotary
Managing Kubernetes Quota with confidence
Stars: ✭ 85 (+39.34%)
Mutual labels:  k8s, kubernetes-controller
Sens8
Kubernetes controller for Sensu checks
Stars: ✭ 42 (-31.15%)
Mutual labels:  k8s, kubernetes-controller
ververica-platform-k8s-operator
Kubernetes Operator for the Ververica Platform
Stars: ✭ 28 (-54.1%)
Mutual labels:  k8s, k8s-controller
Cronjobber
Cronjobber is a cronjob controller for Kubernetes with support for time zones
Stars: ✭ 169 (+177.05%)
Mutual labels:  k8s, kubernetes-controller
Rbacsync
Automatically sync groups into Kubernetes RBAC
Stars: ✭ 197 (+222.95%)
Mutual labels:  k8s, kubernetes-controller
Bonny
The Elixir based Kubernetes Development Framework
Stars: ✭ 190 (+211.48%)
Mutual labels:  k8s, kubernetes-controller
K8gb
A cloud native Kubernetes Global Balancer
Stars: ✭ 113 (+85.25%)
Mutual labels:  k8s, kubernetes-controller
vault-sidecar-injector
Kubernetes admission webhook for secure, seamless and dynamic handling of secrets in your applications
Stars: ✭ 55 (-9.84%)
Mutual labels:  k8s, kubernetes-controller
hcloud-ip-floater
k8s controller for Hetzner Cloud floating IPs
Stars: ✭ 43 (-29.51%)
Mutual labels:  k8s, k8s-controller
cdk-py-k8s-the-real-hard-way-aws
Python CDK code for "Kubernetes The (real) Hard Way (AWS)"
Stars: ✭ 14 (-77.05%)
Mutual labels:  k8s
mck8s
mck8s: Orchestration platform for multi-cluster k8s environments
Stars: ✭ 60 (-1.64%)
Mutual labels:  k8s
boot2podman
Lightweight Linux for Podman
Stars: ✭ 86 (+40.98%)
Mutual labels:  k8s
trafficserver-ingress-controller
Apache Traffic Server Ingress Controller for Kubernetes
Stars: ✭ 29 (-52.46%)
Mutual labels:  k8s
sbom-operator
Catalogue all images of a Kubernetes cluster to multiple targets with Syft
Stars: ✭ 114 (+86.89%)
Mutual labels:  k8s
k0otkit
k0otkit is a universal post-penetration technique which could be used in penetrations against Kubernetes clusters.
Stars: ✭ 217 (+255.74%)
Mutual labels:  k8s
k8s0
Another minimal kubernetes with ansible
Stars: ✭ 23 (-62.3%)
Mutual labels:  k8s
fury-kubernetes-opa
Kubernetes Fury OPA. Policy enforcement for your Kubernetes Cluster
Stars: ✭ 34 (-44.26%)
Mutual labels:  k8s
Lecture k8s starter.kit
'쉽게 시작하는 쿠버네티스' 온라인 강의
Stars: ✭ 58 (-4.92%)
Mutual labels:  k8s
CKA-Exercises
A set of curated exercises to help prepare you for the Certified Kubernetes Administrator Exam by the Cloud Native Computing Foundation
Stars: ✭ 51 (-16.39%)
Mutual labels:  k8s
kubectl-janitor
List Kubernetes objects in a problematic state
Stars: ✭ 48 (-21.31%)
Mutual labels:  k8s

AWS Cloud Map MCS Controller for K8s

Documentation CodeQL Build status Deploy status Integration status codecov

License contributions welcome GitHub issues Go Report Card

Introduction

The AWS Cloud Map Multi-cluster Service Discovery Controller for Kubernetes (K8s) implements the Kubernetes KEP-1645: Multi-Cluster Services API and KEP-2149: ClusterId for ClusterSet identification, which allows services to communicate across multiple clusters. The implementation relies on AWS Cloud Map for enabling cross-cluster service discovery.

Installation

Perform the following installation steps on each participating cluster.

  • For multi-cluster service discovery and consumption, the controller should be installed on a minimum of 2 EKS clusters.
  • Participating clusters should be provisioned into a single AWS account, within a single AWS region.

Dependencies

Network

The AWS Cloud Map MCS Controller for K8s provides service discovery and communication across multiple clusters, therefore implementations depend on end-end network connectivity between workloads provisioned within each participating cluster.

  • In deployment scenarios where participating clusters are provisioned into separate VPCs, connectivity will depend on correctly configured VPC Peering, inter-VPC routing, and Security Group configuration. The VPC Reachability Analyzer can be used to test and validate end-end connectivity between worker nodes within each cluster.
  • Undefined behavior may occur if controllers are deployed without the required network connectivity between clusters.

Configure CoreDNS

Install the CoreDNS multicluster plugin into each participating cluster. The multicluster plugin enables CoreDNS to lifecycle manage DNS records for ServiceImport objects.

To install the plugin, run the following commands.

kubectl apply -k "github.com/aws/aws-cloud-map-mcs-controller-for-k8s/samples/coredns-clusterrole.yaml"
kubectl apply -k "github.com/aws/aws-cloud-map-mcs-controller-for-k8s/samples/coredns-configmap.yaml"
kubectl apply -k "github.com/aws/aws-cloud-map-mcs-controller-for-k8s/samples/coredns-deployment.yaml"

Install Controller

To install the latest release of the controller, run the following commands.

NOTE: AWS region environment variable can be optionaly set like export AWS_REGION=us-west-2 Otherwise the controller will infer region in the order AWS_REGION environment variable, ~/.aws/config file, then EC2 metadata (for EKS environment)

kubectl apply -k "github.com/aws/aws-cloud-map-mcs-controller-for-k8s/config/controller_install_release"

📌 See Releases section for details on how to install other versions.

The controller must have sufficient IAM permissions to perform required Cloud Map operations. Grant IAM access rights AWSCloudMapFullAccess to the controller Service Account to enable the controller to manage Cloud Map resources.

Usage

Configure cluster.clusterset.k8s.io and clusterset.k8s.io

cluster.clusterset.k8s.io is a unique identifier for the cluster.

clusterset.k8s.io is an identifier that relates to the ClusterSet in which the cluster belongs.

apiVersion: about.k8s.io/v1alpha1
kind: ClusterProperty
metadata:
  name: cluster.clusterset.k8s.io
spec:
  value: [Your Cluster identifier]
---
apiVersion: about.k8s.io/v1alpha1
kind: ClusterProperty
metadata:
  name: clusterset.k8s.io
spec:
  value: [Your ClusterSet identifier]

Example:

apiVersion: about.k8s.io/v1alpha1
kind: ClusterProperty
metadata:
  name: cluster.clusterset.k8s.io
spec:
  value: my-first-cluster
---
apiVersion: about.k8s.io/v1alpha1
kind: ClusterProperty
metadata:
  name: clusterset.k8s.io
spec:
  value: my-clusterset

Export services

Then assuming you already have a Service installed, apply a ServiceExport yaml to the cluster in which you want to export a service. This can be done for each service you want to export.

kind: ServiceExport
apiVersion: multicluster.x-k8s.io/v1alpha1
metadata:
  namespace: [Your service namespace here]
  name: [Your service name]

Example: This will export a service with name my-amazing-service in namespace hello

kind: ServiceExport
apiVersion: multicluster.x-k8s.io/v1alpha1
metadata:
  namespace: hello
  name: my-amazing-service

See the samples directory for a set of example yaml files to set up a service and export it. To apply the sample files run the following commands.

kubectl create namespace example
kubectl apply -k "github.com/aws/aws-cloud-map-mcs-controller-for-k8s/samples/example-deployment.yaml
kubectl apply -k "github.com/aws/aws-cloud-map-mcs-controller-for-k8s/samples/example-service.yaml
kubectl apply -k "github.com/aws/aws-cloud-map-mcs-controller-for-k8s/samples/example-serviceexport.yaml

Import services

In your other cluster, the controller will automatically sync services registered in AWS Cloud Map by applying the appropriate ServiceImport. To list them all, run the following command.

kubectl get ServiceImport -A

Releases

AWS Cloud Map MCS Controller for K8s adheres to the SemVer specification. Each release updates the major version tag (eg. vX), a major/minor version tag (eg. vX.Y) and a major/minor/patch version tag (eg. vX.Y.Z). To see a full list of all releases, refer to our Github releases page.

NOTE: AWS region environment variable can be optionally set like export AWS_REGION=us-west-2 Otherwise controller will infer region in the order AWS_REGION environment variable, ~/.aws/config file, then EC2 metadata (for EKS environment)

The following command format is used to install from a particular release.

kubectl apply -k "github.com/aws/aws-cloud-map-mcs-controller-for-k8s/config/controller_install_release[?ref=*git version tag*]"

Run the following command to install the latest release.

kubectl apply -k "github.com/aws/aws-cloud-map-mcs-controller-for-k8s/config/controller_install_release"

The following example will install release v0.1.0.

kubectl apply -k "github.com/aws/aws-cloud-map-mcs-controller-for-k8s/config/controller_install_release?ref=v0.1.0"

We also maintain a latest tag, which is updated to stay in line with the main branch. We do not recommend installing this on any production cluster, as any new major versions updated on the main branch will introduce breaking changes.

To install from latest tag run the following command.

kubectl apply -k "github.com/aws/aws-cloud-map-mcs-controller-for-k8s/config/controller_install_latest"

Slack community

We have an open Slack community where users may get support with integration, discuss controller functionality and provide input on our feature roadmap. https://awsappmesh.slack.com/#k8s-mcs-controller Join the channel with this invite.

Contributing

aws-cloud-map-mcs-controller-for-k8s is an open source project. See CONTRIBUTING for details.

License

This project is distributed under the Apache License, Version 2.0, see LICENSE and NOTICE for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].