From 63e68ab720f4c42e397a93a4814d8adfb6c830af Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Tue, 31 Mar 2020 09:09:24 -0500 Subject: [PATCH] Update kubectl run to kubectl create deploy --- slides/k8s/architecture.md | 2 +- slides/k8s/dmuc.md | 2 +- slides/k8s/dryrun.md | 4 ++-- slides/k8s/kubectlexpose.md | 4 ++-- slides/k8s/logs-cli.md | 8 ++++---- slides/k8s/operators.md | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/slides/k8s/architecture.md b/slides/k8s/architecture.md index 6aeb4251..ea0b7ee4 100644 --- a/slides/k8s/architecture.md +++ b/slides/k8s/architecture.md @@ -352,7 +352,7 @@ We demonstrated *update* and *watch* semantics. - That's where the actual logic of Kubernetes lives -- When we create a Deployment (e.g. with `kubectl run web --image=nginx`), +- When we create a Deployment (e.g. with `kubectl create deployment web --image=nginx`), - we create a Deployment object diff --git a/slides/k8s/dmuc.md b/slides/k8s/dmuc.md index 94658c6b..6424a149 100644 --- a/slides/k8s/dmuc.md +++ b/slides/k8s/dmuc.md @@ -6,7 +6,7 @@ - Our goal is to build a minimal cluster allowing us to: - - create a Deployment (with `kubectl run` or `kubectl create deployment`) + - create a Deployment (with `kubectl create deployment`) - expose it with a Service - connect to that service diff --git a/slides/k8s/dryrun.md b/slides/k8s/dryrun.md index 6078d9dd..f5a40c67 100644 --- a/slides/k8s/dryrun.md +++ b/slides/k8s/dryrun.md @@ -172,7 +172,7 @@ Note: we don't need to specify `--validate=false` here. ## Advantage of YAML -- Using YAML (instead of `kubectl run`/`create`/etc.) allows to be *declarative* +- Using YAML (instead of `kubectl create `) allows to be *declarative* - The YAML describes the desired state of our cluster and applications @@ -194,7 +194,7 @@ Note: we don't need to specify `--validate=false` here. ## YAML in practice -- Get started with `kubectl run`/`create`/`expose`/etc. +- Get started with `kubectl create deployment` and `kubectl expose` - Dump the YAML with `kubectl get -o yaml` diff --git a/slides/k8s/kubectlexpose.md b/slides/k8s/kubectlexpose.md index a5fd4d8f..d1347da1 100644 --- a/slides/k8s/kubectlexpose.md +++ b/slides/k8s/kubectlexpose.md @@ -151,9 +151,9 @@ ## Creating a deployment for our HTTP server -- We *could* do `kubectl run httpenv --image=jpetazzo/httpenv` ... +- We will create a deployment with `kubectl create deployment` -- But since `kubectl run` is being deprecated, let's see how to use `kubectl create` instead +- Then we will scale it with `kubectl scale` .exercise[ diff --git a/slides/k8s/logs-cli.md b/slides/k8s/logs-cli.md index 9c810692..f02dc358 100644 --- a/slides/k8s/logs-cli.md +++ b/slides/k8s/logs-cli.md @@ -132,15 +132,15 @@ Exactly what we need! - Everything created with `kubectl run` has a label `run` -- We can use that property to view the logs of all the pods created with `kubectl run` +- Everything created with `kubectl create deployment` has a label `app` -- Similarly, everything created with `kubectl create deployment` has a label `app` +- We can use that property to view the logs of all the pods created with `kubectl create deployment` .exercise[ -- View the logs for all the things started with `kubectl run`: +- View the logs for all the things started with `kubectl create deployment`: ```bash - stern -l run + stern -l app ```