Skip to content

Commit fcebbd7

Browse files
Merge pull request #2617 from DougAnsonAustinTX/Garnder_on_GCP_LP_Techreview
updates for the gardener techreview
2 parents 438cbab + 0eec335 commit fcebbd7

6 files changed

Lines changed: 95 additions & 46 deletions

File tree

content/learning-paths/servers-and-cloud-computing/gardener-gcp/baseline.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This section checks whether your Gardener Local setup is working correctly on an
1212
### Set Kubeconfig
1313
This tells Kubernetes commands (**kubectl) which cluster to talk to**. Without this, kubectl won’t know where your Gardener cluster is.
1414
``` console
15-
export KUBECONFIG=/home/gcpuser/gardener/kind/kubeconfig.yaml
15+
export KUBECONFIG=$PWD/example/gardener-local/kind/local/kubeconfig
1616
```
1717

1818
### Check Cluster Health
@@ -140,6 +140,8 @@ test-nginx 0/1 ContainerCreating 0 1s
140140
test-nginx 1/1 Running 0 4s
141141
```
142142

143+
Now, press "ctrl-c" in the ssh shell to kill the currently running monitor.
144+
143145
### Expose the Pod (ClusterIP Service)
144146
Pods cannot be accessed directly by other pods reliably.
145147
So we create a Kubernetes Service.
@@ -234,7 +236,7 @@ Ensures CoreDNS is functioning and services resolve properly. Run `nslookup` ins
234236
If DNS resolves correctly, service discovery is healthy.
235237

236238
``` console
237-
kubectl exec curl -- nslookup test-nginx-svc
239+
kubectl exec curl -- nslookup test-nginx-svc.default.svc.cluster.local
238240
```
239241

240242
You should see an output similar to:

content/learning-paths/servers-and-cloud-computing/gardener-gcp/benchmarking.md

Lines changed: 10 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ If the cluster is not running or you don’t have admin access, security checks
2323
**Verify cluster:**
2424

2525
```console
26-
kubectl get shoots -n garden
26+
cd ~/gardener
27+
export KUBECONFIG=$PWD/example/gardener-local/kind/local/kubeconfig
28+
kubectl apply -f example/provider-local/shoot.yaml
29+
kubectl -n garden-local get shoots
2730
kubectl get nodes
2831
```
2932
If the cluster is not ready, benchmarking does not make sense yet.
@@ -32,8 +35,8 @@ If the cluster is not ready, benchmarking does not make sense yet.
3235
Download the Arm64-compatible kube-bench binary from the official GitHub release. This tool will be used to check your Kubernetes cluster against CIS security benchmarks.
3336

3437
```console
35-
curl -L \
36-
https://github.com/aquasecurity/kube-bench/releases/download/v0.10.3/kube-bench_0.10.3_linux_arm64.tar.gz
38+
cd ~
39+
curl -L https://github.com/aquasecurity/kube-bench/releases/download/v0.10.3/kube-bench_0.10.3_linux_arm64.tar.gz --output ./kube-bench_0.10.3_linux_arm64.tar.gz
3740
```
3841

3942
### Extract and Install kube-bench Configuration
@@ -123,36 +126,9 @@ resources and that all new resources are created in a specific namespace.
123126
49 checks WARN
124127
0 checks INFO
125128
```
126-
### Benchmark summary on x86_64
127-
To compare the benchmark results, the following results were collected by running the same benchmark on a `x86 - c4-standard-4` (4 vCPUs, 15 GB Memory) x86_64 VM in GCP, running SUSE:
128-
129-
| Category / Subsection | PASS | FAIL | WARN |
130-
| ------------------------------------------- | :--: | :--: | :--: |
131-
| **1. Control Plane Security Configuration** | | | |
132-
| └─ 1.1 Control Plane Node Configuration Files | 0 | 18 | 3 |
133-
| └─ 1.2 API Server | 9 | 7 | 5 |
134-
| └─ 1.3 Controller Manager | 5 | 0 | 1 |
135-
| └─ 1.4 Scheduler | 1 | 1 | 0 |
136-
| **2. Etcd Node Configuration** | | | |
137-
| └─ 2.1-2.7 Etcd Node Config | 7 | 0 | 0 |
138-
| **3. Control Plane Configuration** | | | |
139-
| └─ 3.1 Authentication and Authorization | 0 | 0 | 3 |
140-
| └─ 3.2 Logging | 0 | 0 | 2 |
141-
| **4. Worker Node Security Configuration** | | | |
142-
| └─ 4.1 Worker Node Configuration Files | 2 | 5 | 4 |
143-
| └─ 4.2 Kubelet | 5 | 3 | 3 |
144-
| └─ 4.3 kube-proxy | 1 | 0 | 0 |
145-
| **5. Kubernetes Policies** | | | |
146-
| └─ 5.1 RBAC and Service Accounts | 0 | 6 | 7 |
147-
| └─ 5.2 Pod Security Standards | 0 | 0 | 13 |
148-
| └─ 5.3 Network Policies and CNI | 0 | 0 | 2 |
149-
| └─ 5.4 Secrets Management | 0 | 0 | 2 |
150-
| └─ 5.5 Extensible Admission Control | 0 | 0 | 1 |
151-
| └─ 5.7 General Policies | 0 | 0 | 4 |
152-
| **Total** | 34 | 42 | 54 |
153-
154-
### Benchmark summary on Arm64
155-
Results from the earlier run on the `c4a-standard-4` (4 vCPU, 16 GB memory) Arm64 VM in GCP (SUSE):
129+
130+
### Benchmark summary
131+
Results from the earlier run on the `c4a-standard-4` (4 vCPU, 16 GB memory) Arm64 VM in GCP (SUSE) will be similar to:
156132

157133
| Category / Subsection | PASS | FAIL | WARN |
158134
|-------------------------------------------------|:----:|:----:|:----:|
@@ -179,8 +155,7 @@ Results from the earlier run on the `c4a-standard-4` (4 vCPU, 16 GB memory) Arm6
179155
| └─ 5.7 General Policies | 0 | 0 | 4 |
180156
| **Total** | 43 | 38 | 49 |
181157

182-
### Gardener benchmarking comparison on Arm64 and x86_64
183-
158+
### Conclusions
184159
- **Strong Baseline Security:** The cluster passed **43 CIS checks**, indicating a solid foundational security posture out of the box on **Arm64 (C4A)** infrastructure.
185160
- **Control Plane Hardening Gaps:** A significant number of **FAIL results (38)** are concentrated in **control plane file permissions and API server settings**, which are commonly unmet in development and local/KinD-based setups.
186161
- **Healthy Etcd Configuration:** All **Etcd-related checks passed (7/7)**, demonstrating correct encryption, access controls, and secure peer/client configuration on **Arm64**.
22.3 KB
Loading
12.5 KB
Loading

content/learning-paths/servers-and-cloud-computing/gardener-gcp/installation.md

Lines changed: 66 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ This enables SUSE’s official container support, so Docker and container tools
2121

2222
``` console
2323
sudo SUSEConnect -p sle-module-containers/15.5/arm64
24-
SUSEConnect --list-extensions | grep Containers
24+
sudo SUSEConnect --list-extensions | grep Containers
2525
```
2626

27+
You should see "Activated" as part of the output from the above commands.
28+
2729
### Install Docker
2830
Docker is required to run KinD and Kubernetes components as containers. This step installs Docker, starts it, and allows your user to run Docker without sudo.
2931
``` console
@@ -32,9 +34,20 @@ sudo zypper install -y docker
3234
sudo systemctl enable --now docker
3335
sudo usermod -aG docker $USER
3436
exit
37+
```
38+
39+
Next, re-open a new shell into your VM and type the following:
40+
41+
```console
3542
docker ps
3643
```
3744

45+
You should see the following output:
46+
47+
```output
48+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
49+
```
50+
3851
### Install Go 1.24 (Manual)
3952
Gardener requires a newer Go version than what SUSE provides by default. Here, Go 1.24 is downloaded and installed manually.
4053

@@ -81,7 +94,9 @@ Kustomize Version: v5.7.1
8194
Helm is used to install and manage Kubernetes applications. Gardener uses Helm internally to deploy its components.
8295

8396
``` console
84-
curl -sSfL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | console
97+
curl -sSfL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 > get_helm.sh
98+
chmod 755 ./get_helm.sh
99+
./get_helm.sh
85100
helm version
86101
```
87102

@@ -116,6 +131,12 @@ sudo mv kustomize /usr/local/bin/
116131
kustomize version
117132
```
118133

134+
You should see an output (Kustomize version) that is similar to:
135+
136+
```output
137+
v5.3.0
138+
```
139+
119140
### Install Kind
120141
Kind (Kubernetes in Docker) creates a local Kubernetes cluster inside Docker. Gardener Local runs entirely on this KinD cluster.
121142

@@ -160,19 +181,40 @@ Here you download the Gardener’s source code and switch to a known, stable rel
160181
``` console
161182
cd ~
162183
git clone https://github.com/gardener/gardener.git
184+
cd gardener
163185
git fetch --all --tags
164186
git checkout v1.122.0
165-
cd gardener
166187
```
167188

168189
### Clean Old KinD Network
169190
This removes any leftover KinD network from previous runs to avoid IP or port conflicts.
170191

171192
``` console
172-
docker network rm kind || true
193+
docker network rm kind
194+
```
195+
196+
You should get the following output which is correct:
197+
198+
```output
199+
Error response from daemon: network kind not found
200+
exit status 1
201+
```
202+
203+
You can confirm this by typing:
204+
205+
```console
173206
docker network ls
174207
```
175208

209+
Your output should look something like this (note the absence of the "kind" name...its not present in the network config):
210+
211+
```output
212+
NETWORK ID NAME DRIVER SCOPE
213+
bb9f7955c11b bridge bridge local
214+
aec64365a860 host host local
215+
d60c34b45e0a none null local
216+
```
217+
176218
### Create Gardener KinD Cluster
177219
This step creates the Kubernetes cluster using KinD and prepares it to run Gardener.
178220

@@ -200,18 +242,20 @@ certificatesigningrequest.certificates.k8s.io/csr-rnvdk approved
200242
Kubelet Serving Certificate Signing Requests approved.
201243
```
202244

203-
### If IP/port binding fails (common on SUSE)
204-
If KinD fails due to networking issues (common on SUSE), re-adding loopback IPs fixes the problem.
245+
### If the above "make" command fails...
246+
247+
If the above make command fails, please reset the loopback interfaces as follows and re-try the make command:
205248

206249
``` console
207250
sudo ip addr del 172.18.255.1/32 dev lo
208251
sudo ip addr del 172.18.255.22/32 dev lo
209252
sudo ip addr add 172.18.255.1/32 dev lo
210253
sudo ip addr add 172.18.255.22/32 dev lo
211-
docker network rm kind
254+
ip addr show lo
212255
make kind-up
213256
```
214257

258+
215259
### Export kubeconfig
216260
This config file allows `kubectl` to connect to the newly created Gardener local cluster.
217261

@@ -325,13 +369,28 @@ EOF
325369
```
326370

327371
### Get Shoot Admin Kubeconfig
372+
373+
{{% notice Note %}}
374+
You may need to wait a 4-5 minutes before running the next commands... otherwise, they may fail.
375+
If they fail, please wait a bit and retry again.
376+
{{% /notice %}}
377+
328378
This generates an admin kubeconfig so you can access and manage the Shoot Kubernetes cluster.
329379

330380
``` console
331381
./hack/usage/generate-admin-kubeconf.sh > admin-kubeconf.yaml
332382
KUBECONFIG=admin-kubeconf.yaml kubectl get nodes
333383
```
334384

385+
{{% notice Note %}}
386+
If you get the following result from the "kubectl get nodes" command above:
387+
```output
388+
No resources found
389+
```
390+
Please wait a bit and retry again. Your nodes are still being generated!
391+
{{% /notice %}}
392+
393+
335394
You should see an output similar to:
336395

337396
```output

content/learning-paths/servers-and-cloud-computing/gardener-gcp/instance.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,19 @@ To create a virtual machine based on the C4A instance type:
2626

2727
![Create a Google Axion C4A Arm virtual machine in the Google Cloud Console with c4a-standard-4 selected alt-text#center](images/gcp-vm.png "Creating a Google Axion C4A Arm virtual machine in Google Cloud Console")
2828

29-
- Under **OS and Storage**, select **Change**, then choose an Arm64-based OS image. For this Learning Path, use **SUSE Linux Enterprise Server**. Pick the preferred version for your Operating System. Ensure you select the **Arm image** variant. Click **Select**.
30-
- Under **Networking**, enable **Allow HTTP traffic**.
29+
30+
- Under **OS and Storage**, select **Change**, then choose an Arm64-based OS image. For this Learning Path, use **SUSE Linux Enterprise Server**.
31+
- If using use **SUSE Linux Enterprise Server**. Select "Pay As You Go" for the license type.
32+
- Edit the Disk size ("Size(GB)" Textfield...) below and change it from "10" to "50" to increase the disk size of the VM to 50 GB...
33+
- Once appropriately selected and configured, please Click **Select**.
34+
- Under **Networking**, enable **Allow HTTP traffic** as well as **Allow HTTPS traffic**.
3135
- Click **Create** to launch the instance.
36+
- Once created, you should see a "SSH" option to the right in your list of VM instances. Click on this to launch a SSH shell into your VM instance:
37+
38+
![Invoke a SSH session via your browser alt-text#center](images/gcp-ssh.png "Invoke a SSH session into your running VM instance")
39+
40+
- A window from your browser should come up and you should now see a shell into your VM instance:
41+
42+
![Terminal Shell in your VM instance alt-text#center](images/gcp-shell.png "Terminal shell in your VM instance")
43+
44+
Next, let's install Gardner!

0 commit comments

Comments
 (0)