Skip to content

Commit de9f2be

Browse files
Terry HoweTony Norlin
authored andcommitted
EKS Anywhere v1.21 conformance (cncf#1605)
1 parent 9814316 commit de9f2be

File tree

4 files changed

+31865
-0
lines changed

4 files changed

+31865
-0
lines changed

v1.21/eks-a/PRODUCT.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
vendor: Amazon Web Services
2+
name: Amazon Elastic Kubernetes Service Anywhere (Amazon EKS Anywhere)
3+
version: v1.21.2
4+
website_url: https://aws.amazon.com/eks/eks-anywhere
5+
repo_url: https://github.com/aws/eks-anywhere
6+
documentation_url: https://anywhere.eks.amazonaws.com/
7+
product_logo_url: https://a0.awsstatic.com/libra-css/images/logos/aws_logo_smile_1200x630.png
8+
type: installer
9+
description: Amazon EKS Anywhere is a new deployment option for Amazon EKS that allows customers to create and operate Kubernetes clusters on customer-managed infrastructure, supported by AWS.

v1.21/eks-a/README.md

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
# Conformance testing Amazon EKS Anywhere
2+
3+
## Setup EKS Anywhere Cluster
4+
5+
Setup EKS Anywhere cluster according to the [EKS Anywhere documentation](https://anywhere.eks.amazonaws.com/).
6+
7+
Create an [EKS Anywhere production cluster](https://anywhere.eks.amazonaws.com/docs/getting-started/production-environment/) to reproduce the EKS Anywhere Conformance e2e results.
8+
9+
10+
## Requirements
11+
Create a Kubernetes cluster on a target workload environment with EKS Anywhere run on an administrative machine.
12+
13+
### Target Workload Environment
14+
15+
The target workload environment will need:
16+
17+
* A vSphere 7+ environment running vCenter
18+
* Capacity to deploy 6-10VMs
19+
* DHCP service running in vSphere environment in the primary VM network for your workload cluster
20+
* One network in vSphere to use for the cluster. This network must have inbound access into vCenter
21+
* A OVA imported into vSphere and converted into template for the workload VMs
22+
* User credentials to [create vms and attach networks, etc]({{< relref "user-permissions.md" >}})
23+
24+
Each VM will require:
25+
26+
* 2 vCPU
27+
* 8GB RAM
28+
* 25GB Disk
29+
30+
### Administrative Machine
31+
32+
The administrative machine will need:
33+
34+
* Docker 20.x.x
35+
* Mac OS (10.15) / Ubuntu (20.04.2 LTS)
36+
* 4 CPU cores
37+
* 16GB memory
38+
* 30GB free disk space
39+
40+
#### Kubectl
41+
42+
On the administrative machine, install and configure the Kubernetes command-line tool
43+
[kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
44+
45+
#### Docker
46+
47+
The method to [install Docker](https://docs.docker.com/get-docker/) depends on your operating system and architecture.
48+
If you are using Ubuntu use the [Docker CE](https://docs.docker.com/engine/install/ubuntu/) installation instructions to install Docker and not the Snap installation.
49+
50+
#### EKS Anywhere
51+
52+
Install [EKS Anywhere](https://anywhere.eks.amazonaws.com/docs/getting-started/install/) on your administrative machine.
53+
54+
#### Sonobuoy
55+
56+
Download a binary release of [sonobuoy](https://github.com/vmware-tanzu/sonobuoy/releases/).
57+
58+
If you are on a Mac, you many need to open the Security & Privacy and approve sonobuoy for
59+
execution.
60+
61+
```shell
62+
if [[ "$(uname)" == "Darwin" ]]
63+
then
64+
SONOBUOY=https://github.com/vmware-tanzu/sonobuoy/releases/download/v0.50.0/sonobuoy_0.50.0_darwin_amd64.tar.gz
65+
else
66+
SONOBUOY=https://github.com/vmware-tanzu/sonobuoy/releases/download/v0.50.0/sonobuoy_0.50.0_linux_386.tar.gz
67+
fi
68+
wget -qO- ${SONOBUOY} |tar -xz sonobuoy
69+
chmod 755 sonobuoy
70+
```
71+
72+
## Create EKS Anywhere Cluster
73+
74+
1. Generate a cluster configuration:
75+
76+
```shell
77+
CLUSTER_NAME=prod
78+
eksctl anywhere generate clusterconfig $CLUSTER_NAME --provider vsphere >cluster.yaml
79+
```
80+
81+
1. Populate cluster configuration. For example:
82+
83+
```yaml
84+
apiVersion: anywhere.eks.amazonaws.com/v1alpha1
85+
kind: Cluster
86+
metadata:
87+
name: prod
88+
spec:
89+
clusterNetwork:
90+
cni: cilium
91+
pods:
92+
cidrBlocks:
93+
- 192.168.0.0/16
94+
services:
95+
cidrBlocks:
96+
- 10.96.0.0/12
97+
controlPlaneConfiguration:
98+
count: 2
99+
endpoint:
100+
host: ""
101+
machineGroupRef:
102+
kind: VSphereMachineConfig
103+
name: prod-cp
104+
datacenterRef:
105+
kind: VSphereDatacenterConfig
106+
name: prod
107+
externalEtcdConfiguration:
108+
count: 3
109+
machineGroupRef:
110+
kind: VSphereMachineConfig
111+
name: prod-etcd
112+
kubernetesVersion: "1.21"
113+
workerNodeGroupConfigurations:
114+
- count: 2
115+
machineGroupRef:
116+
kind: VSphereMachineConfig
117+
name: prod
118+
---
119+
apiVersion: anywhere.eks.amazonaws.com/v1alpha1
120+
kind: VSphereDatacenterConfig
121+
metadata:
122+
name: prod
123+
spec:
124+
datacenter: SDDC-Datacenter
125+
insecure: false
126+
network: /SDDC-Datacenter/network/sddc-cgw-network-1
127+
server: vcenter.sddc-12-345-678-9.vmwarevmc.com
128+
thumbprint: ""
129+
---
130+
apiVersion: anywhere.eks.amazonaws.com/v1alpha1
131+
kind: VSphereMachineConfig
132+
metadata:
133+
name: prod-cp
134+
spec:
135+
datastore: /SDDC-Datacenter/datastore/WorkloadDatastore
136+
diskGiB: 25
137+
folder: /SDDC-Datacenter/vm/capv/prod
138+
memoryMiB: 8192
139+
numCPUs: 2
140+
osFamily: bottlerocket
141+
resourcePool: '*/Resources/Compute-ResourcePool'
142+
users:
143+
- name: ec2-user
144+
sshAuthorizedKeys:
145+
- "ssh-rsa AAAA..."
146+
---
147+
apiVersion: anywhere.eks.amazonaws.com/v1alpha1
148+
kind: VSphereMachineConfig
149+
metadata:
150+
name: prod
151+
spec:
152+
datastore: /SDDC-Datacenter/datastore/WorkloadDatastore
153+
diskGiB: 25
154+
folder: /SDDC-Datacenter/vm/capv/prod
155+
memoryMiB: 8192
156+
numCPUs: 2
157+
osFamily: bottlerocket
158+
resourcePool: '*/Resources/Compute-ResourcePool'
159+
users:
160+
- name: ec2-user
161+
sshAuthorizedKeys:
162+
- "ssh-rsa AAAA..."
163+
---
164+
apiVersion: anywhere.eks.amazonaws.com/v1alpha1
165+
kind: VSphereMachineConfig
166+
metadata:
167+
name: prod-etcd
168+
spec:
169+
datastore: /SDDC-Datacenter/datastore/WorkloadDatastore
170+
diskGiB: 25
171+
folder: /SDDC-Datacenter/vm/capv/prod
172+
memoryMiB: 8192
173+
numCPUs: 2
174+
osFamily: bottlerocket
175+
resourcePool: '*/Resources/Compute-ResourcePool'
176+
users:
177+
- name: ec2-user
178+
sshAuthorizedKeys:
179+
- "ssh-rsa AAAA..."
180+
```
181+
182+
1. Set credential environment variables
183+
184+
```shell
185+
export EKSA_VSPHERE_USERNAME='billy'
186+
export EKSA_VSPHERE_PASSWORD='t0p$ecret'
187+
```
188+
189+
1. Create a cluster
190+
191+
```shell
192+
eksctl anywhere create cluster -f cluster.yaml -v 4
193+
```
194+
195+
196+
## Run Sonobuoy e2e
197+
```
198+
./sonobuoy run --mode=certified-conformance --wait --kube-conformance-image k8s.gcr.io/conformance:v1.21.2
199+
results=$(./sonobuoy retrieve)
200+
mkdir ./results
201+
tar xzf $results -C ./results
202+
./sonobuoy e2e ${results}
203+
mv results/plugins/e2e/results/global/* .
204+
```
205+
206+
## Cleanup
207+
```shell
208+
eksctl anywhere delete cluster prod -v 4
209+
rm -rf cluster.yaml prod *tar.gz results
210+
```

0 commit comments

Comments
 (0)