Skip to content

Commit

Permalink
Making everything compatible with DC/OS 1.13 and Kubernetes 1.14.1
Browse files Browse the repository at this point in the history
  • Loading branch information
djannot committed May 20, 2019
1 parent b486bbb commit ef15c25
Show file tree
Hide file tree
Showing 29 changed files with 95 additions and 93 deletions.
Binary file modified .DS_Store
Binary file not shown.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ During this training, you'll learn how to use the main capabilities of Kubernete

Clone this Repo:
```
git clone https://github.com/ably77/dcos-kubernetes-training.git
git clone https://github.com/djannot/dcos-kubernetes-training.git
```

Change directory to dcos-kubernetes-training
```
cd dcos-kubernetes-training
```

## [Instructors / Platform Operators](https://github.com/ably77/dcos-kubernetes-training/tree/master/instructor.md)
## [Instructors / Platform Operators](https://github.com/djannot/dcos-kubernetes-training/tree/master/instructor.md)
Follow the link above to access the Instructors README to set up the lab cluster

## [Student / Development or DevOps teams](https://github.com/ably77/dcos-kubernetes-training/tree/master/labs)
## [Student / Development or DevOps teams](https://github.com/djannot/dcos-kubernetes-training/tree/master/labs)
Follow the link above to access the Course Labs
Binary file modified images/lab3_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion instructor.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ Run the automated install to get the DC/OS cluster set up with MKE and EdgeLB:
./instructor_automated.sh
```

# [Teardown Instructions for once the Lab is Completed](https://github.com/ably77/dcos-kubernetes-training/tree/master/teardown.md)
# [Teardown Instructions for once the Lab is Completed](https://github.com/djannot7/dcos-kubernetes-training/tree/master/teardown.md)
Follow the link above to access teardown instructions for the cluster
10 changes: 5 additions & 5 deletions instructor_automated.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## CHANGE THIS EVERY TIME!!!
export APPNAME=training
export PUBLICIP=34.209.90.37
export CLUSTER=k8s-training
export REGION=us-west-2
export clusters=25
export maws=398053451782_Mesosphere-PowerUser
export PUBLICIP=34.193.81.97
export CLUSTER=djannot
export REGION=us-east-1
export clusters=3
export maws=110465657741_Mesosphere-PowerUser

#### Remove all DC/OS Clusters
rm -rf ~/.dcos/clusters
Expand Down
2 changes: 2 additions & 0 deletions labs/linux-macOS/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ During this training, you'll learn how to use the main capabilities of Kubernete
- Configure Helm
- Deploy Istio using Helm
- Deploy an application on Istio

[Move to Lab 0 - Prerequisites](https://github.com/djannot/dcos-kubernetes-training/blob/master/labs/linux-macOS/lab0_prerequisites.md)
4 changes: 2 additions & 2 deletions labs/linux-macOS/lab0_prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ sudo chmod +x /usr/local/bin/dcos

Windows:
Follow the instructions located in the top-right dropdown to install the DC/OS CLI on a Windows machine
![Install Windows CLI](https://github.com/ably77/dcos-kubernetes-training/blob/master/images/lab0_1.png)
![Install Windows CLI](https://github.com/djannot/dcos-kubernetes-training/blob/master/images/lab0_1.png)

## Set up DC/OS CLI Using HTTPS (required by Kubernetes)
Run the following command to setup the DC/OS CLI:
Expand Down Expand Up @@ -138,4 +138,4 @@ $ cat /etc/hosts

## Finished with the Lab 0 - Prerequisites

[Move to Lab 1 - Deploying Kubernetes](https://github.com/ably77/dcos-kubernetes-training/blob/master/labs/linux-macOS/lab1_deploying_kubernetes.md)
[Move to Lab 1 - Deploying Kubernetes](https://github.com/djannot/dcos-kubernetes-training/blob/master/labs/linux-macOS/lab1_deploying_kubernetes.md)
14 changes: 7 additions & 7 deletions labs/linux-macOS/lab1_deploying_kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- Connect to the kubernetes cluster using kubectl and access the dashboard through a browser on your local machine

### Why is this Important?
There are many ways to deploy a kubernetes cluster from a fully manual procedure to using a fully automated or opinionated SaaS. Cluster sizes can also widely vary from a single node deployment on your laptop, to thousands of nodes in a single logical cluster, or even across multiple clusters. Thus, picking a deployment model that suits the scale that you need as your business grows is important.
There are many ways to deploy a kubernetes cluster from a fully manual procedure to using a fully automated or opinionated SaaS. Cluster sizes can also widely vary from a single node deployment on your laptop, to thousands of nodes in a single logical cluster, or even across multiple clusters. Thus, picking a deployment model that suits the scale that you need as your business grows is important.

## Install the DC/OS Kubernetes CLI:
The DC/OS Kubernetes CLI aims to help operators deploy, operate, maintain, and troubleshoot Kubernetes clusters running on DC/OS
Expand All @@ -29,7 +29,7 @@ sed "s/TOBEREPLACED/${CLUSTER}/g" options-kubernetes-cluster.json.template > opt

To deploy your kubernetes cluster:
```
dcos kubernetes cluster create --yes --options=options-kubernetes-cluster${CLUSTER}.json --package-version=2.2.1-1.13.4
dcos kubernetes cluster create --yes --options=options-kubernetes-cluster${CLUSTER}.json --package-version=2.2.2-1.13.5
```

To see the status of your Kubernetes cluster deployment run:
Expand Down Expand Up @@ -59,9 +59,9 @@ Output should look similar to below:
```
$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
kube-control-plane-0-instance.trainingprodk8scluster01.mesos Ready master 17m v1.13.4
kube-node-0-kubelet.trainingprodk8scluster01.mesos Ready <none> 16m v1.13.4
kube-node-1-kubelet.trainingprodk8scluster01.mesos Ready <none> 16m v1.13.4
kube-control-plane-0-instance.trainingprodk8scluster01.mesos Ready master 17m v1.13.5
kube-node-0-kubelet.trainingprodk8scluster01.mesos Ready <none> 16m v1.13.5
kube-node-1-kubelet.trainingprodk8scluster01.mesos Ready <none> 16m v1.13.5
```

## Connect to the Kubernetes dashboard
Expand All @@ -77,8 +77,8 @@ Open the following page in your web browser:

Login using the config file.

![Kubernetes dashboard](https://github.com/ably77/dcos-kubernetes-training/blob/master/images/lab1_1.png)
![Kubernetes dashboard](https://github.com/djannot/dcos-kubernetes-training/blob/master/images/lab1_1.png)

## Finished with the Lab 1 - Deploying Kubernetes

[Move to Lab 2 - Scaling](https://github.com/ably77/dcos-kubernetes-training/blob/master/labs/linux-macOS/lab2_scaling.md)
[Move to Lab 2 - Scaling](https://github.com/djannot/dcos-kubernetes-training/blob/master/labs/linux-macOS/lab2_scaling.md)
6 changes: 3 additions & 3 deletions labs/linux-macOS/lab2_scaling.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dcos kubernetes cluster update --cluster-name=training/prod/k8s/cluster${CLUSTER

Navigate to the UI --> services --> training --> prod --> k8s --> cluster${CLUSTER} to see the upgrade visually

![Scaling - DC/OS Services Console](https://github.com/ably77/dcos-kubernetes-training/blob/master/images/lab2_1.png)
![Scaling - DC/OS Services Console](https://github.com/djannot/dcos-kubernetes-training/blob/master/images/lab2_1.png)

Output should look similar to below once completed
```
Expand All @@ -52,8 +52,8 @@ dcos kubernetes cluster debug plan status deploy --cluster-name=${APPNAME}/prod/

You can check that the new node is shown in the Kubernetes Dashboard:

![Kubernetes dashboard scaled](https://github.com/ably77/dcos-kubernetes-training/blob/master/images/lab2_2.png)
![Kubernetes dashboard scaled](https://github.com/djannot/dcos-kubernetes-training/blob/master/images/lab2_2.png)

## Finished with the Lab 2 - Scaling

[Move to Lab 3 - Upgrading Kubernetes](https://github.com/ably77/dcos-kubernetes-training/blob/master/labs/linux-macOS/lab3_upgrading.md)
[Move to Lab 3 - Upgrading Kubernetes](https://github.com/djannot/dcos-kubernetes-training/blob/master/labs/linux-macOS/lab3_upgrading.md)
14 changes: 7 additions & 7 deletions labs/linux-macOS/lab3_upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dcos kubernetes manager update package-versions
## Upgrade Kubernetes cluster
Run the following command to upgrade your Kubernetes cluster:
```
dcos kubernetes cluster update --cluster-name=training/prod/k8s/cluster${CLUSTER} --package-version=2.2.2-1.13.5
dcos kubernetes cluster update --cluster-name=training/prod/k8s/cluster${CLUSTER} --package-version=2.3.0-1.14.1
```

## Watch your Kubernetes cluster upgrade
Expand Down Expand Up @@ -61,15 +61,15 @@ Output should look similar to below:
```
kubectl get nodes
NAME STATUS ROLES AGE VERSION
kube-control-plane-0-instance.trainingprodk8scluster${CLUSTER}.mesos Ready master 94m v1.13.5
kube-node-0-kubelet.trainingprodk8scluster${CLUSTER}.mesos Ready <none> 92m v1.13.5
kube-node-1-kubelet.trainingprodk8scluster${CLUSTER}.mesos Ready <none> 92m v1.13.5
kube-node-2-kubelet.trainingprodk8scluster${CLUSTER}.mesos Ready <none> 36m v1.13.5
kube-control-plane-0-instance.trainingprodk8scluster${CLUSTER}.mesos Ready master 94m v1.14.1
kube-node-0-kubelet.trainingprodk8scluster${CLUSTER}.mesos Ready <none> 92m v1.14.1
kube-node-1-kubelet.trainingprodk8scluster${CLUSTER}.mesos Ready <none> 92m v1.14.1
kube-node-2-kubelet.trainingprodk8scluster${CLUSTER}.mesos Ready <none> 36m v1.14.1
```

You can also see in the UI that cluster01 has been upgraded to 1.13.5
![Upgrade](https://github.com/ably77/dcos-kubernetes-training/blob/master/images/lab3_1.png)
![Upgrade](https://github.com/djannot/dcos-kubernetes-training/blob/master/images/lab3_1.png)

## Finished with the Lab 3 - Upgrading

[Move to Lab 4 - Loadbalancing](https://github.com/ably77/dcos-kubernetes-training/blob/master/labs/linux-macOS/lab4_loadbalancing.md)
[Move to Lab 4 - Loadbalancing](https://github.com/djannot/dcos-kubernetes-training/blob/master/labs/linux-macOS/lab4_loadbalancing.md)
16 changes: 6 additions & 10 deletions labs/linux-macOS/lab4_loadbalancing.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ To expose your applications using running on Kubernetes using L4/L7 we can use D
- Deploy a couple hello-world applications and expose using type NodePort. Then expose your applications using an Ingress service (L7) and validate that the connection is exposed to the outside

### Why is this Important?
Exposing your application on a kubernetes cluster in an Enterprise-grade environment can be challenging to set up. Cloud providers allow for integrations to their load balancing services, but also at a separate cost. DC/OS provides a clean, self-service integration to our load balancing service Edge-LB that allows users to easily expose their applications using just a few annotations. Submit your typical Pod, Service, and Ingress manifests and DKLB will do the rest - dynamically build a load balanced pool and expose your applications for both L4 (TCP) and L7 (HTTP) connections.
Exposing your application on a kubernetes cluster in an Enterprise-grade environment can be challenging to set up. Cloud providers allow for integrations to their load balancing services, but also at a separate cost. DC/OS provides a clean, self-service integration to our load balancing service Edge-LB that allows users to easily expose their applications using just a few annotations. Submit your typical Pod, Service, and Ingress manifests and DKLB will do the rest - dynamically build a load balanced pool and expose your applications for both L4 (TCP) and L7 (HTTP) connections.

## Install Edge-LB CLI
```
Expand All @@ -27,7 +27,7 @@ kubectl --kubeconfig=./config.cluster${CLUSTER} create -f dklb-deployment.yaml

You can use the Kubernetes Dashboard to check that the deployment dklb is running in the kube-system namespace

![Kubernetes dashboard dklb](https://github.com/ably77/dcos-kubernetes-training/blob/master/images/lab4_1.png)
![Kubernetes dashboard dklb](https://github.com/djannot/dcos-kubernetes-training/blob/master/images/lab4_1.png)

## Deploy a Redis Pod
You can now deploy a redis Pod on your Kubernetes cluster running the following command
Expand Down Expand Up @@ -95,13 +95,11 @@ Output should look similar to below:
$ dcos edgelb list
NAME APIVERSION COUNT ROLE PORTS
all V2 2 slave_public 9091, 8443
dklb V2 2 slave_public 0, 8001, 9001, 10001
dklb02 V2 2 slave_public 0, 8002
dklb03 V2 2 slave_public 0, 8003
dklb01 V2 2 slave_public 0, 8001
```

You can also see pools being dynamically created in the UI:
![dklb pool](https://github.com/ably77/dcos-kubernetes-training/blob/master/images/lab4_2.png)
![dklb pool](https://github.com/djannot/dcos-kubernetes-training/blob/master/images/lab4_2.png)

## Validate Redis connection
You can validate that you can access the redis POD from your laptop using telnet:
Expand Down Expand Up @@ -178,9 +176,7 @@ Output should look like below:
$ dcos edgelb list
NAME APIVERSION COUNT ROLE PORTS
all V2 2 slave_public 9091, 8443
dklb V2 2 slave_public 0, 8001, 9001, 10001
dklb02 V2 2 slave_public 0, 8002, 9002, 10002
dklb03 V2 2 slave_public 0, 8003, 9003
dklb01 V2 2 slave_public 0, 8001, 9001
```

## Validate Ingress connection
Expand All @@ -192,4 +188,4 @@ curl -H "Host: http-echo-${CLUSTER}-2.com" http://${PUBLICIP}:90${CLUSTER}

## Finished with the Lab 4 - Load Balancing

[Move to Lab 5 - Portworx Storage](https://github.com/ably77/dcos-kubernetes-training/blob/master/labs/linux-macOS/lab5_portworxstorage.md)
[Move to Lab 5 - Portworx Storage](https://github.com/djannot/dcos-kubernetes-training/blob/master/labs/linux-macOS/lab5_portworxstorage.md)
6 changes: 3 additions & 3 deletions labs/linux-macOS/lab5_portworxstorage.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Mesosphere provides multiple ways to achieving persistent storage for containeri

To be able to use Portworx persistent storage on your Kubernetes cluster, you need to deploy it in your Kubernetes cluster using the following command:
```
kubectl --kubeconfig=./config.cluster${CLUSTER} apply -f "https://install.portworx.com/2.0?kbver=1.13.3&b=true&dcos=true&stork=true"
kubectl --kubeconfig=./config.cluster${CLUSTER} apply -f "https://install.portworx.com/2.0?kbver=1.14.1&b=true&dcos=true&stork=true"
```

## Create Kubernetes StorageClass
Expand Down Expand Up @@ -66,7 +66,7 @@ kubectl --kubeconfig=./config.cluster${CLUSTER} describe pvc pvc001

Wait as the PVC is being built, this may take a few moments. Output should looks similar to below:
```
$ kubectl describe pvc pvc001
kubectl --kubeconfig=./config.cluster${CLUSTER} describe pvc pvc001
Name: pvc001
Namespace: default
StorageClass: portworx-sc
Expand Down Expand Up @@ -176,4 +176,4 @@ kubectl --kubeconfig=./config.cluster${CLUSTER} delete pod pvpod2

## Finished with the Lab 5 - Portworx Storage

[Move to Lab 6 - CSI Storage](https://github.com/ably77/dcos-kubernetes-training/blob/master/labs/linux-macOS/lab6_csi_storage.md)
[Move to Lab 6 - CSI Storage](https://github.com/djannot/dcos-kubernetes-training/blob/master/labs/linux-macOS/lab6_csi_storage.md)
2 changes: 1 addition & 1 deletion labs/linux-macOS/lab6_csi_storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,4 @@ kubectl --kubeconfig=./config.cluster${CLUSTER} exec -i $pod cat /data/out.txt

## Finished with the Lab 6 - CSI Storage

[Move to Lab 7 - Configuring Helm](https://github.com/ably77/dcos-kubernetes-training/blob/master/labs/linux-macOS/lab7_configure_helm.md)
[Move to Lab 7 - Configuring Helm](https://github.com/djannot/dcos-kubernetes-training/blob/master/labs/linux-macOS/lab7_configure_helm.md)
2 changes: 1 addition & 1 deletion labs/linux-macOS/lab7_configure_helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ helm --kubeconfig=./config.cluster${CLUSTER} init --service-account tiller

## Finished with the Lab 7 - Configure Helm

[Move to Lab 8 - Istio](https://github.com/ably77/dcos-kubernetes-training/blob/master/labs/linux-macOS/lab8_istio.md)
[Move to Lab 8 - Istio](https://github.com/djannot/dcos-kubernetes-training/blob/master/labs/linux-macOS/lab8_istio.md)
2 changes: 1 addition & 1 deletion labs/linux-macOS/lab8_istio.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ Go to the following URL to access the application through your web browser:
open http://${PUBLICIP}:100${CLUSTER}/productpage
```

![Istio - bookstore app](https://github.com/ably77/dcos-kubernetes-training/blob/master/images/lab8_1.png)
![Istio - bookstore app](https://github.com/djannot/dcos-kubernetes-training/blob/master/images/lab8_1.png)

## Other Istio Features
You can then follow the other steps described in the Istio documentation to understand the different Istio features:
Expand Down
2 changes: 2 additions & 0 deletions labs/windows_WIP/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ During this training, you'll learn how to use the main capabilities of Kubernete
- Configure Helm
- Deploy Istio using Helm
- Deploy an application on Istio

[Move to Lab 0 - Prerequisites](https://github.com/djannot/dcos-kubernetes-training/blob/master/labs/windows_WIP/lab0_prerequisites.md)
4 changes: 2 additions & 2 deletions labs/windows_WIP/lab0_prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Log into the DC/OS Kubernetes cluster with the information provided by your inst

Windows:
Follow the instructions located in the top-right dropdown to install the DC/OS CLI on a Windows machine
![Install Windows CLI](https://github.com/ably77/dcos-kubernetes-training/blob/master/images/lab0_1.png)
![Install Windows CLI](https://github.com/djannot/dcos-kubernetes-training/blob/master/images/lab0_1.png)

## Set up DC/OS CLI Using HTTPS (required by Kubernetes)
Run the following command to setup the DC/OS CLI:
Expand Down Expand Up @@ -88,4 +88,4 @@ We will be using this hostname translation when connecting to our kubernetes clu

## Finished with the Lab 0 - Prerequisites

[Move to Lab 1 - Deploying Kubernetes](https://github.com/ably77/dcos-kubernetes-training/blob/master/labs/lab1_deploying_kubernetes.md)
[Move to Lab 1 - Deploying Kubernetes](https://github.com/djannot/dcos-kubernetes-training/blob/master/labs/lab1_deploying_kubernetes.md)
12 changes: 6 additions & 6 deletions labs/windows_WIP/lab1_deploying_kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ dcos security org users grant %serviceaccount% dcos:mesos:master:volume:role:sla
dcos security org users grant %serviceaccount% dcos:mesos:master:framework:role:slave_public read
dcos security org users grant %serviceaccount% dcos:mesos:agent:framework:role:slave_public read
dcos kubernetes cluster create --yes --options=options-kubernetes-cluster%1%.json --package-version=2.2.1-1.13.4
dcos kubernetes cluster create --yes --options=options-kubernetes-cluster%1%.json --package-version=2.2.2-1.13.5
```

## Deploy Kubernetes
Expand Down Expand Up @@ -99,9 +99,9 @@ Output should look similar to below:
```
$ kubectl --kubeconfig=./config.cluster%CLUSTER% get nodes
NAME STATUS ROLES AGE VERSION
kube-control-plane-0-instance.trainingprodk8scluster01.mesos Ready master 17m v1.13.4
kube-node-0-kubelet.trainingprodk8scluster01.mesos Ready <none> 16m v1.13.4
kube-node-1-kubelet.trainingprodk8scluster01.mesos Ready <none> 16m v1.13.4
kube-control-plane-0-instance.trainingprodk8scluster01.mesos Ready master 17m v1.13.5
kube-node-0-kubelet.trainingprodk8scluster01.mesos Ready <none> 16m v1.13.5
kube-node-1-kubelet.trainingprodk8scluster01.mesos Ready <none> 16m v1.13.5
```

## Connect to the Kubernetes dashboard
Expand All @@ -117,8 +117,8 @@ Open the following page in your web browser:

Login using the config file.

![Kubernetes dashboard](https://github.com/ably77/dcos-kubernetes-training/blob/master/images/lab1_1.png)
![Kubernetes dashboard](https://github.com/djannot/dcos-kubernetes-training/blob/master/images/lab1_1.png)

## Finished with the Lab 1 - Deploying Kubernetes

[Move to Lab 2 - Scaling](https://github.com/ably77/dcos-kubernetes-training/blob/master/labs/lab2_scaling.md)
[Move to Lab 2 - Scaling](https://github.com/djannot/dcos-kubernetes-training/blob/master/labs/lab2_scaling.md)
6 changes: 3 additions & 3 deletions labs/windows_WIP/lab2_scaling.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dcos kubernetes cluster update --cluster-name=training/prod/k8s/cluster%CLUSTER%

Navigate to the UI --> services --> training --> prod --> k8s --> cluster${CLUSTER} to see the upgrade visually

![Scaling - DC/OS Services Console](https://github.com/ably77/dcos-kubernetes-training/blob/master/images/lab2_1.png)
![Scaling - DC/OS Services Console](https://github.com/djannot/dcos-kubernetes-training/blob/master/images/lab2_1.png)

Output should look similar to below once completed
```
Expand All @@ -46,8 +46,8 @@ dcos kubernetes cluster debug plan status deploy --cluster-name=%APPNAME%/prod/k

You can check that the new node is shown in the Kubernetes Dashboard:

![Kubernetes dashboard scaled](https://github.com/ably77/dcos-kubernetes-training/blob/master/images/lab2_2.png)
![Kubernetes dashboard scaled](https://github.com/djannot/dcos-kubernetes-training/blob/master/images/lab2_2.png)

## Finished with the Lab 2 - Scaling

[Move to Lab 3 - Upgrading Kubernetes](https://github.com/ably77/dcos-kubernetes-training/blob/master/labs/lab3_upgrading.md)
[Move to Lab 3 - Upgrading Kubernetes](https://github.com/djannot/dcos-kubernetes-training/blob/master/labs/lab3_upgrading.md)
Loading

0 comments on commit ef15c25

Please sign in to comment.