Skip to content

Commit d086028

Browse files
Bharath KaimalBharath Kaimal
authored andcommitted
updates to lab order and structure
1 parent 1d1bb19 commit d086028

File tree

14 files changed

+185
-192
lines changed

14 files changed

+185
-192
lines changed

docs/labs/index.md

Lines changed: 40 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,56 @@
11
# Activities
2+
23
## Containers
34

4-
| Task | Description | Link |
5-
| --------------------------------| ------------------ |:----------- |
6-
| ***Try It Yourself*** | | |
7-
| IBM Container Registry | Build and Deploy Run using IBM Container Registry | [IBM Container Registry](containers/container-registry/index.md) |
8-
| Docker Lab | Running a Sample Application on Docker | [Docker Lab](containers/index.md) |
5+
| Task | Description | Link |
6+
| ---------------------- | ------------------------------------------------- | :--------------------------------------------------------------- |
7+
| **_Try It Yourself_** | | |
8+
| IBM Container Registry | Build and Deploy Run using IBM Container Registry | [IBM Container Registry](containers/container-registry/index.md) |
9+
| Docker Lab | Running a Sample Application on Docker | [Docker Lab](containers/index.md) |
910

1011
## Kubernetes
1112

12-
| Task | Description | Link |
13-
| --------------------------------| ------------------ |:----------- |
14-
| ***Try It Yourself*** | | |
15-
| Pod Creation | Challenge yourself to create a Pod YAML file to meet certain parameters. | [Pod Creation](kubernetes/lab1/index.md) |
16-
| Pod Configuration | Configure a pod to meet compute resource requirements. | [Pod Configuration](kubernetes/lab2/index.md) |
17-
| Multiple Containers | Build a container using legacy container image.| [Multiple Containers](kubernetes/lab3/index.md) |
18-
| Probes | Create some Health & Startup Probes to find what's causing an issue. | [Probes](kubernetes/lab4/index.md) |
19-
| Debugging | Find which service is breaking in your cluster and find out why. | [Debugging](kubernetes/lab5/index.md) |
20-
| Rolling Updates Lab | Create a Rolling Update for your application. | [Rolling Updates](kubernetes/lab6/index.md) |
21-
| Cron Jobs Lab | Using Tekton to test new versions of applications. | [Crons Jobs](kubernetes/lab7/index.md) |
22-
| Creating Services | Create two services with certain requirements. | [Setting up Services](kubernetes/lab8/index.md) |
23-
| Setting up Persistent Volumes | Create a Persistent Volume that's accessible from a SQL Pod. | [Setting up Persistent Volumes](kubernetes/lab10/index.md) |
24-
| IKS Ingress Controller | Configure Ingress on Free IKS Cluster | [Setting IKS Ingress](kubernetes/ingress-iks/index.md) |
25-
| ***Solutions*** | | |
26-
| Lab Solutions | Solutions for the Kubernetes Labs | [Solutions](kubernetes/lab-solutions.md) |
13+
| Task | Description | Link |
14+
| ----------------------------- | ------------------------------------------------------------------------ | :-------------------------------------------------------- |
15+
| **_Try It Yourself_** | | |
16+
| Pod Creation | Challenge yourself to create a Pod YAML file to meet certain parameters. | [Pod Creation](kubernetes/lab1/index.md) |
17+
| Probes | Create some Health & Startup Probes to find what's causing an issue. | [Probes](kubernetes/lab2/index.md) |
18+
| Debugging | Find which service is breaking in your cluster and find out why. | [Debugging](kubernetes/lab3/index.md) |
19+
| Multiple Containers | Build a container using legacy container image. | [Multiple Containers](kubernetes/lab4/index.md) |
20+
| Setting up Persistent Volumes | Create a Persistent Volume that's accessible from a SQL Pod. | [Setting up Persistent Volumes](kubernetes/lab5/index.md) |
21+
| Pod Configuration | Configure a pod to meet compute resource requirements. | [Pod Configuration](kubernetes/lab6/index.md) |
22+
| Rolling Updates Lab | Create a Rolling Update for your application. | [Rolling Updates](kubernetes/lab7/index.md) |
23+
| Cron Jobs Lab | Using Tekton to test new versions of applications. | [Crons Jobs](kubernetes/lab8/index.md) |
24+
| Creating Services | Create two services with certain requirements. | [Setting up Services](kubernetes/lab9/index.md) |
25+
| Network Policies | Create a policy to allow client pods with labels to access secure pod. | [Network Policies](kubernetes/lab10/index.md) |
26+
| IKS Ingress Controller | Configure Ingress on Free IKS Cluster | [Setting IKS Ingress](kubernetes/ingress-iks/index.md) |
27+
| **_Solutions_** | | |
28+
| Lab Solutions | Solutions for the Kubernetes Labs | [Solutions](kubernetes/lab-solutions.md) |
2729

2830
## DevOps
2931

30-
| Task | Description | Link |
31-
| --------------------------------| ------------------ |:----------- |
32-
| ***Walkthroughs*** | | |
33-
| Deploying Applications From Source | Using OpenShift 4 | [S2I](https://learn.openshift.com/introduction/deploying-python/) |
34-
| ***Try It Yourself*** | | |
35-
| Tekton Lab | Using Tekton to test new versions of applications. | [Tekton](devops/tekton/index.md) |
36-
| IBM Cloud DevOps | Using IBM Cloud ToolChain with Tekton | [Tekton on IBM Cloud](devops/ibm-toolchain/index.md) |
37-
| Jenkins Lab | Using Jenkins to test new versions of applications. | [Jenkins](devops/jenkins/index.md) |
32+
| Task | Description | Link |
33+
| ---------------------------------- | --------------------------------------------------- | :---------------------------------------------------------------- |
34+
| **_Walkthroughs_** | | |
35+
| Deploying Applications From Source | Using OpenShift 4 | [S2I](https://learn.openshift.com/introduction/deploying-python/) |
36+
| **_Try It Yourself_** | | |
37+
| Tekton Lab | Using Tekton to test new versions of applications. | [Tekton](devops/tekton/index.md) |
38+
| IBM Cloud DevOps | Using IBM Cloud ToolChain with Tekton | [Tekton on IBM Cloud](devops/ibm-toolchain/index.md) |
39+
| Jenkins Lab | Using Jenkins to test new versions of applications. | [Jenkins](devops/jenkins/index.md) |
3840

3941
## GitOps
4042

41-
| Task | Description | Link |
42-
| --------------------------------| ------------------ |:----------- |
43-
| ***Walkthroughs*** | | | |
44-
| GitOps | Introduction to GitOps with OpenShift | [Learn OpenShift](https://learn.openshift.com/introduction/gitops-introduction/) |
45-
| GitOps Multi-cluster | Multi-cluster GitOps with OpenShift | [Learn OpenShift](https://learn.openshift.com/introduction/gitops-multicluster/) |
46-
| ***Try It Yourself*** | | |
47-
| ArgoCD Lab | Learn how to setup ArgoCD and Deploy Application | [ArgoCD](devops/argocd/index.md) |
43+
| Task | Description | Link |
44+
| --------------------- | ------------------------------------------------ | :------------------------------------------------------------------------------- | --- |
45+
| **_Walkthroughs_** | | | |
46+
| GitOps | Introduction to GitOps with OpenShift | [Learn OpenShift](https://learn.openshift.com/introduction/gitops-introduction/) |
47+
| GitOps Multi-cluster | Multi-cluster GitOps with OpenShift | [Learn OpenShift](https://learn.openshift.com/introduction/gitops-multicluster/) |
48+
| **_Try It Yourself_** | | |
49+
| ArgoCD Lab | Learn how to setup ArgoCD and Deploy Application | [ArgoCD](devops/argocd/index.md) |
4850

4951
## Projects
5052

51-
| Task | Description | Link |
52-
| --------------------------------| ------------------ |:----------- |
53-
| ***Try It Yourself*** | | |
53+
| Task | Description | Link |
54+
| ---------------------- | ---------------------------------------------- | :------------------------------------------ |
55+
| **_Try It Yourself_** | | |
5456
| Cloud Native Challenge | Deploy your own app using what we have learned | [CN Challenge](../cloudnative-challenge.md) |

docs/labs/kubernetes/lab1/index.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
1-
---
2-
title: Kubernetes Lab 1 - Pod Creation
3-
---
1+
# Kubernetes Lab 1 - Pod Creation
42

53
## Problem
64

75
- Write a pod definition named `yoda-service-pod.yml` Then create a pod in the cluster using this definition to make sure it works.
86

97
The specificationsof this pod are as follows:
108

11-
- Use the `bitnami/nginx` container image.
12-
- The container needs a containerPort of `80`.
13-
- Set the command to run as `nginx`
14-
- Pass in the `-g daemon off; -q` args to run nginx in quiet mode.
15-
- Create the pod in the `web` namespace.
16-
9+
- Use the `bitnami/nginx` container image.
10+
- The container needs a containerPort of `80`.
11+
- Set the command to run as `nginx`
12+
- Pass in the `-g daemon off; -q` args to run nginx in quiet mode.
13+
- Create the pod in the `web` namespace.
1714

1815
## Verification
1916

20-
When you have completed this lab, use the following commands to validate your solution. The 'get pods' command will
17+
When you have completed this lab, use the following commands to validate your solution. The 'get pods' command will
2118

2219
`kubectl get pods -n web`
2320
`kubectl describe pod nginx -n web`
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
---
2-
title: Kubernetes Lab 10 - Network Policies
3-
---
1+
# Kubernetes Lab 10 - Network Policies
42

53
## Problem
64

@@ -14,6 +12,7 @@ kubectl -n kube-system get pods | grep calico-node
1412
```
1513

1614
Create secured pod
15+
1716
```yaml
1817
apiVersion: v1
1918
kind: Pod
@@ -23,24 +22,24 @@ metadata:
2322
app: secure-app
2423
spec:
2524
containers:
26-
- name: nginx
27-
image: bitnami/nginx
28-
ports:
29-
- containerPort: 8080
25+
- name: nginx
26+
image: bitnami/nginx
27+
ports:
28+
- containerPort: 8080
3029
```
3130
3231
Create client pod
32+
3333
```yaml
3434
apiVersion: v1
3535
kind: Pod
3636
metadata:
3737
name: network-policy-client-pod
3838
spec:
3939
containers:
40-
- name: busybox
41-
image: radial/busyboxplus:curl
42-
command: ["/bin/sh", "-c", "while true; do sleep 3600; done"]
40+
- name: busybox
41+
image: radial/busyboxplus:curl
42+
command: ["/bin/sh", "-c", "while true; do sleep 3600; done"]
4343
```
4444
4545
Create a policy to allow only client pods with label `allow-access: "true"` to access secure pod
46-

docs/labs/kubernetes/lab2/index.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
1-
---
2-
title: Kubernetes Lab 2 - Probes
3-
---
1+
# Kubernetes Lab 2 - Probes
42

53
### Container Health Issues
64

75
The first issue is caused by application instances entering an unhealthy state and responding to user requests with error messages. Unfortunately, this state does not cause the container to stop, so the Kubernetes cluster is not able to detect this state and restart the container. Luckily, the application has an internal endpoint that can be used to detect whether or not it is healthy. This endpoint is `/healthz` on port `8080`.
86

9-
- Your first task will be to *create a probe* to check this endpoint periodically.
7+
- Your first task will be to _create a probe_ to check this endpoint periodically.
108
- If the endpoint returns an **error** or **fails** to respond, the probe will detect this and the cluster will restart the container.
119

1210
### Container Startup Issues
1311

1412
Another issue is caused by new pods when they are starting up. The application takes a few seconds after startup before it is ready to service requests. As a result, some users are getting error message during this brief time.
1513

16-
- To fix this, you will need to *create another probe*. To detect whether the application is `ready`, the probe should simply make a request to the root endpoint, *`/ready`, on port `8080`*. If this request succeeds, then the application is ready.
14+
- To fix this, you will need to _create another probe_. To detect whether the application is `ready`, the probe should simply make a request to the root endpoint, _`/ready`, on port `8080`_. If this request succeeds, then the application is ready.
1715

1816
- Also set a `initial delay` of `5 seconds` for the probes.
1917

20-
Here is the Pod yaml file, **add** the probes, then **create** the pod in the cluster to test it.
18+
Here is the Pod yaml file, **add** the probes, then **create** the pod in the cluster to test it.
2119

2220
```yaml
2321
apiVersion: v1
@@ -26,6 +24,6 @@ metadata:
2624
name: energy-shield-service
2725
spec:
2826
containers:
29-
- name: energy-shield
30-
image: ibmcase/energy-shield:1
27+
- name: energy-shield
28+
image: ibmcase/energy-shield:1
3129
```

docs/labs/kubernetes/lab3/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
---
2-
title: Kubernetes Lab 3 - Debugging
3-
---
1+
# Kubernetes Lab 3 - Debugging
42

53
## Problem
64

@@ -16,12 +14,14 @@ Here are some tips to help you solve the Hyper Drive:
1614
- To fix the deployment, save then modify the yaml file for redeployment.
1715

1816
Reset the environment:
17+
1918
```
2019
minikube delete
2120
minikube start
2221
```
2322

2423
Setup the environment:
24+
2525
```
2626
kubectl apply -f https://raw.githubusercontent.com/ibm-cloud-architecture/learning-cloudnative-101/master/lab-setup/lab-5-debug-k8s-setup.yaml
2727
```
@@ -32,4 +32,4 @@ Once you get the Hyper Drive working again. Verify it by checking the endpoints.
3232

3333
```
3434
kubectl get ep hyper-drive
35-
```
35+
```

docs/labs/kubernetes/lab4/index.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
---
2-
title: Kubernetes Lab 4 - Manage Multiple Containers
3-
---
1+
# Kubernetes Lab 4 - Manage Multiple Containers
42

53
## Problem
64

75
This service has already been packaged into a container image, but there is one special requirement:
8-
- The legacy app is hard-coded to only serve content on port `8989`, but the team wants to be able to access the service using the standard port `80`.
6+
7+
- The legacy app is hard-coded to only serve content on port `8989`, but the team wants to be able to access the service using the standard port `80`.
98

109
Your task is to build a Kubernetes pod that runs this legacy container and uses the ambassador design pattern to expose access to the service on port `80`.
1110

@@ -16,7 +15,6 @@ This setup will need to meet the following specifications:
1615
- The `vader-service` pod should have an ambassador container that runs the `haproxy:1.7` image and proxies incoming traffic on port `80` to the legacy service on port `8989` (the HAProxy configuration for this is provided below).
1716
- Port `80` should be exposed as a `containerPort`.
1817

19-
2018
<InlineNotification>
2119

2220
**Note**: You do not need to expose port 8989
@@ -25,7 +23,7 @@ This setup will need to meet the following specifications:
2523

2624
- The HAProxy configuration should be stored in a ConfigMap called `vader-service-ambassador-config`.
2725
- The HAProxy config should be provided to the ambassador container using a volume mount that places the data from the ConfigMap in a file at /usr/local/etc/haproxy/haproxy.cfg.
28-
haproxy.cfg should contain the following configuration data:
26+
haproxy.cfg should contain the following configuration data:
2927

3028
```
3129
global
@@ -54,24 +52,27 @@ metadata:
5452
name: busybox
5553
spec:
5654
containers:
57-
- name: myapp-container
58-
image: radial/busyboxplus:curl
59-
command: ['sh', '-c', 'while true; do sleep 3600; done']
55+
- name: myapp-container
56+
image: radial/busyboxplus:curl
57+
command: ["sh", "-c", "while true; do sleep 3600; done"]
6058
```
6159
6260
Create the busybox testing pod.
61+
6362
```
6463
kubectl apply -f busybox.yml
6564
```
6665

6766
Use this command to access `vader-service` using port 80 from within the busybox pod.
67+
6868
```
6969
kubectl exec busybox -- curl $(kubectl get pod vader-service -o=custom-columns=IP:.status.podIP --no-headers):80
7070
```
7171

7272
If the service is working, you should get a message that the hyper drive of the millennium falcon needs repair.
7373

74-
*Relevant Documentation:*
74+
_Relevant Documentation:_
75+
7576
- [Kubernetes Sidecar Logging Agent](https://kubernetes.io/docs/concepts/cluster-administration/logging/#using-a-sidecar-container-with-the-logging-agent)
7677
- [Shared Volumes](https://kubernetes.io/docs/tasks/access-application-cluster/communicate-containers-same-pod-shared-volume/)
7778
- [Distributed System Toolkit Patterns](https://kubernetes.io/blog/2015/06/the-distributed-system-toolkit-patterns/)

docs/labs/kubernetes/lab5/index.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
---
2-
title: Kubernetes Lab 5 - Persistent Volumes
3-
---
1+
# Kubernetes Lab 5 - Persistent Volumes
42

53
## Problem
64

@@ -29,6 +27,7 @@ Create a `PersistentVolumeClaim`:
2927
- Use the same storageClassName and accessModes as the PersistentVolume so that this claim can bind to the PersistentVolume.
3028

3129
Create a `Postgresql` Pod configured to use the `PersistentVolumeClaim`:
30+
3231
- The Pod should be named `postgresql-pod`.
3332

3433
- Use the image `bitnami/postgresql`.
@@ -38,5 +37,3 @@ Create a `Postgresql` Pod configured to use the `PersistentVolumeClaim`:
3837
- Set an `environment variable` called `MYSQL_ROOT_PASSWORD` with the value `password`.
3938

4039
- Add the `PersistentVolumeClaim` as a volume and mount it to the container at the path `/bitnami/postgresql/`.
41-
42-

0 commit comments

Comments
 (0)