You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
4
23
documentation, we greatly value feedback and contributions from our community.
5
24
@@ -8,38 +27,50 @@ information to effectively respond to your bug report or contribution.
8
27
9
28
## Getting Started
10
29
11
-
### Build and Run locally
30
+
### Local Setup
12
31
13
32
#### Prerequisites
14
33
15
34
In order to build and run locally:
16
35
17
36
* Make sure to have `kubectl`[installed](https://kubernetes.io/docs/tasks/tools/install-kubectl/), at least version `1.15` or above.
18
37
* Make sure to have `kind`[installed](https://kind.sigs.k8s.io/docs/user/quick-start/#installation).
19
-
* Make sure, you have created a [HttpNamespace](https://docs.aws.amazon.com/cloud-map/latest/api/API_CreateHttpNamespace.html)in AWS Cloud Map. The examples below assumes the namespace name to be `demo`
38
+
* Make sure, you have access to AWS Cloud Map. As per exercise below, AWS Cloud Map namespace `example` of the type [HttpNamespace](https://docs.aws.amazon.com/cloud-map/latest/api/API_CreateHttpNamespace.html)will be automatically created.
20
39
21
40
Note that this walk-through assumes throughout to operate in the `us-west-2` region.
22
41
23
42
```sh
24
43
export AWS_REGION=us-west-2
25
44
```
26
45
27
-
#### Cluster provisioning
46
+
#### Cluster Setup
28
47
29
48
Spin up a local Kubernetes cluster using `kind`
49
+
30
50
```sh
31
51
kind create cluster --name my-cluster
32
52
# Creating cluster "my-cluster" ...
33
53
# ...
34
54
```
35
55
36
56
When completed, set the kubectl context
57
+
37
58
```sh
38
59
kind export kubeconfig --name my-cluster
39
60
# Set kubectl context to "kind-my-cluster"
40
61
```
41
62
63
+
Create `example` namespace in the cluster
64
+
65
+
```sh
66
+
kubectl create namespace example
67
+
# namespace/example created
68
+
```
69
+
70
+
#### Run the controller from outside the cluster
71
+
42
72
To register the custom CRDs (`ServiceImport`, `ServiceExport`) in the cluster and create installers
73
+
43
74
```sh
44
75
make install
45
76
# ...
@@ -48,48 +79,88 @@ make install
48
79
```
49
80
50
81
To run the controller, run the following command. The controller runs in an infinite loop so open another terminal to create CRDs.
82
+
51
83
```sh
52
84
make run
53
85
```
54
86
55
-
Create `demo` namespace
56
-
```sh
57
-
kubectl create namespace demo
58
-
# namespace/demo created
59
-
```
87
+
Apply deployment, service and serviceexport configs
60
88
61
-
Apply deployment, service and export configs
62
89
```sh
63
-
kubectl apply -f samples/demo-deployment.yaml
90
+
kubectl apply -f samples/example-deployment.yaml
64
91
# deployment.apps/nginx-deployment created
65
-
kubectl apply -f samples/demo-service.yaml
66
-
# service/demo-service created
67
-
kubectl apply -f samples/demo-export.yaml
68
-
# serviceexport.multicluster.x-k8s.io/demo-service created
# Image: "controller:local" with ID "sha256:xxx" not yet present on node "my-cluster-control-plane", loading...
122
+
```
123
+
124
+
> ⚠ **The controller still needs credentials to interact to AWS SDK.** We are not supporting this configuration out of box. There are multiple ways to achieve this within the cluster.
125
+
126
+
Finally, create the controller resources in the cluster.
127
+
```shell
128
+
make deploy IMG=controller:local AWS_REGION=us-west-2
Copy file name to clipboardExpand all lines: README.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,8 @@ AWS Cloud Map multi-cluster service discovery for Kubernetes (K8s) is a controll
21
21
22
22
First, install the controller with latest release on at least 2 AWS EKS clusters. Nodes must have sufficient IAM permissions to perform CloudMap operations.
23
23
24
+
> **_NOTE:_** AWS region environment variable should be set like `export AWS_REGION=us-west-2`
AWS Cloud Map MCS Controller for K8s adheres to the [SemVer](https://semver.org/) 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](https://github.com/aws/aws-cloud-map-mcs-controller-for-k8s/releases).
69
71
72
+
> **_NOTE:_** AWS region environment variable should be set like `export AWS_REGION=us-west-2`
73
+
70
74
To install from a release run
71
75
```sh
72
76
kubectl apply -k "github.com/aws/aws-cloud-map-mcs-controller-for-k8s/config/controller_install_release[?ref=*git version tag*]"
0 commit comments