Skip to content

Commit d08c4fb

Browse files
committed
[KO] Latest labs fixtures
Small various bits after latest review.
1 parent e9c857b commit d08c4fb

6 files changed

+20
-70
lines changed

Platforming-Kubernetes-With-Operators/Kubernetes-Operators-Helm.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,9 @@ NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
137137
mariadb-0 LoadBalancer 10.96.129.190 192.168.99.222 3306:32128/TCP 28s
138138
```
139139

140-
The service is exposed and accessible, by installing the mariadb package (`yum
141-
-y install mariadb`) and then invoke:
140+
The service is exposed and accessible, by installing the mariadb package (`sudo
141+
yum -y install mariadb` for Red Hat based systems and `sudo apt install -y
142+
mariadb` for Debian based systems) and then invoke:
142143

143144
```console
144145
$ mysql -h 192.168.99.222 -u root -pmariadb

Platforming-Kubernetes-With-Operators/Kubernetes-Operators-MetalLB-Operator.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ configuration of the `KubeProxyConfiguration` resource needs to have the
1212
This is a one command operation:
1313

1414
```console
15-
$ kubectl get configmap kube-proxy -n kube-system -o yaml | \
16-
sed -e "s/strictARP: false/strictARP: true/" | \
17-
kubectl apply -f - -n kube-system
15+
$ kubectl get configmap kube-proxy -n kube-system -o yaml | sed -e "s/strictARP: false/strictARP: true/" | kubectl apply -f - -n kube-system
1816
configmap/kube-proxy configured
1917
```
2018

Platforming-Kubernetes-With-Operators/Kubernetes-Operators-OLM-Operators.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ spec:
144144
source: operatorhubio-catalog
145145
sourceNamespace: olm
146146
installPlanApproval: Manual
147-
#startingCSV: trivy-operator.v0.22.0
148147
startingCSV: trivy-operator.v0.17.1
149148
config:
150149
env:

Platforming-Kubernetes-With-Operators/Kubernetes-Operators-SDK-Install.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,22 @@ operator-sdk version: "v1.32.0", commit: "...", kubernetes version: "1.26.0", go
3838
## Filling all the prerequisites
3939

4040
To automate some of the processes around the Operators installation the `make`
41-
command will be more than useful, so it needs to be installed:
41+
command will be more than useful, so it needs to be installed.
42+
43+
If you use a Red Hat based system:
4244

4345
```bash
4446
$ sudo yum -y install make
4547
...
4648
```
4749

50+
If you use a Debian based system:
51+
52+
```bash
53+
$ sudo apt -y install make
54+
...
55+
```
56+
4857
The test operator that will be implemented will use Ansible, and so there are
4958
some [additional packages](https://sdk.operatorframework.io/docs/building-operators/ansible/installation/)
5059
to install to fully cover the requirements, like `docker` and `python` which

Platforming-Kubernetes-With-Operators/Kubernetes-Operators-SDK-Package.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,6 @@ And change the deployment to mount the configmap:
160160
containers:
161161
- name: akit
162162
image: "{{ akit_container }}"
163-
ports:
164-
- containerPort: 80
165163
volumeMounts:
166164
- name: docroot
167165
mountPath: /usr/share/nginx/html
@@ -202,6 +200,7 @@ $ bin/kustomize build config/manifests --output v0.0.2.yaml
202200
And commit everything as before:
203201

204202
```console$ git status
203+
$ git status
205204
On branch main
206205
Changes not staged for commit:
207206
(use "git add <file>..." to update what will be committed)

Platforming-Kubernetes-With-Operators/Kubernetes-Operators-Trivy-Operator.md

Lines changed: 5 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -237,67 +237,11 @@ al with resource contention.
237237
Events: <none>
238238
```
239239

240-
## Activate useful utilities with kubectl
240+
## Final checks
241241

242-
- Install krew (note the `git` package is a requirement):
243-
244-
```console
245-
$ curl -LO https://github.com/kubernetes-sigs/krew/releases/download/v0.4.4/krew-linux_amd64.tar.gz
246-
...
247-
248-
$ tar -xzvf krew-linux_amd64.tar.gz
249-
...
250-
251-
$ sudo mv krew-linux_amd64 /usr/local/bin/krew
252-
253-
$ krew install krew
254-
Adding "default" plugin index from https://github.com/kubernetes-sigs/krew-index.git.
255-
Updated the local copy of plugin index.
256-
Installing plugin: krew
257-
Installed plugin: krew
258-
\
259-
| Use this plugin:
260-
| kubectl krew
261-
| Documentation:
262-
| https://krew.sigs.k8s.io/
263-
| Caveats:
264-
| \
265-
| | krew is now installed! To start using kubectl plugins, you need to add
266-
| | krew's installation directory to your PATH:
267-
| |
268-
| | * macOS/Linux:
269-
| | - Add the following to your ~/.bashrc or ~/.zshrc:
270-
| | export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
271-
| | - Restart your shell.
272-
| |
273-
| | * Windows: Add %USERPROFILE%\.krew\bin to your PATH environment variable
274-
| |
275-
| | To list krew commands and to get help, run:
276-
| | $ kubectl krew
277-
| | For a full list of available plugins, run:
278-
| | $ kubectl krew search
279-
| |
280-
| | You can find documentation at
281-
| | https://krew.sigs.k8s.io/docs/user-guide/quickstart/.
282-
| /
283-
/
284-
285-
$ echo 'export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"' >> .bash_profile
286-
287-
$ export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
288-
```
289-
290-
Install `who-can` and `tree` kubectl plugins:
291-
292-
```console
293-
$ kubectl krew install who-can
294-
...
295-
296-
$ kubectl krew install tree
297-
...
298-
```
299-
300-
List who can list `vulnerabilityreports`:
242+
As a last check, use the `kubectl` plugins installed following
243+
[Lab | Kubernetes kubectl improvements](https://github.com/mmul-it/training/blob/master/Common/Kubernetes-Kubectl-Improvements.md).
244+
it is possible to list who can list `vulnerabilityreports`:
301245

302246
```console
303247
$ kubectl who-can list vulnerabilityreports
@@ -313,7 +257,7 @@ system:kube-controller-manager system:kube-controller-manager Use
313257
trivy-operator trivy-operator ServiceAccount trivy-system
314258
```
315259

316-
Display the tree view of the `trivy-operator` deployment:
260+
And display the tree view of the `trivy-operator` deployment:
317261

318262
```console
319263
$ kubectl tree -n trivy-system deployment trivy-operator

0 commit comments

Comments
 (0)