Skip to content

Commit f705588

Browse files
authored
add basic hello world
1 parent 46a6467 commit f705588

File tree

4 files changed

+28
-6
lines changed

4 files changed

+28
-6
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This is a Code Lab style course for learning Kubernetes, with the following lessons:
44

55
1. [Installation](docs/install.md) (prerequisite)
6-
1. hello, world
6+
1. [hello, world](docs/hello-world.md)
77
1. Appendix
88
* [About Kubernetes](docs/appendix/about-kubernetes.md)
99
* [Other Guides](docs/appendix/other-guides.md)

TODO.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
- [ ] More lessons:
1+
- [ ] Lessons:
22

3+
- [ ] API: Build your first Kubernetes Resource Model (KRM) Custom Resource Definition (CRD)
4+
- [ ] API: Build an Operator
5+
6+
- [ ] https://googlecontainertools.github.io/kpt/
37
- [ ] https://github.com/kvaps/kubectl-build (or https://github.com/vmware-tanzu/buildkit-cli-for-kubectl)
48
- [ ] https://BuildPacks.io, see [KubeCon Prez](https://static.sched.com/hosted_files/kccnceu2021/f3/IntroductionToCloudNativeBuildpacks_StephenLevineJesseBrown_v1.pdf)
59
- [ ] https://github.com/kvaps/kubectl-node-shell (+ https://github.com/containers/toolbox ?)

docs/hello-world.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# hello, world
2+
3+
## echoserver
4+
5+
k create deployment echoserver --image=k8s.gcr.io/echoserver:1.10
6+
k expose deployment echoserver --type=LoadBalancer --port=8080
7+
curl $(minikube service --url=true echoserver)
8+
9+
<!-- TODO where is the source code of this echoserver? -->
10+
11+
## Dashboard
12+
13+
minikube dashboard
14+
15+
If you run `minikube` inside a Virtual Machine (VM) instead of on your Laptop/Desktop workstation, then you'll need to set up some port forwarding to be able to access services in your local web browser.

docs/install.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# Install Kubernetes
22

3-
To follow the next lessons in this tutorial, you need to have the following prerequisites:
3+
To follow the lessons in this tutorial, you need to have the following prerequisites:
44

55
1. a Kubernetes cluster
6-
1. access to that Kubernets cluster (i.e. credentials to it, in the form of a private key in a `kubectl.yaml` file)
6+
1. configuration to access it (in a `~/.kube/config` file)
77
1. the `kubectl` CLI binary, aliased to `k`
88

9-
There are many ways to get this. One of easiest ways to get started is to use https://minikube.sigs.k8s.io/docs/start.
9+
There are many ways to set this up. One of easiest ways to get started is to use https://minikube.sigs.k8s.io/docs/start, and:
1010

11-
We may add documentation about other approaches later (e.g. `kind`, `kubeadm`; or cloud hosted managed Kubernetes offerings like Google's GKE; or local distributions like k3s.io, k3s.io, OpenShift, et al).
11+
minikube start
12+
alias k="minikube kubectl -- "
13+
14+
Alternatives include e.g. `kind`, `kubeadm`; or cloud hosted managed Kubernetes offerings like Google's GKE; or local distributions like k3s.io, k3s.io, OpenShift, et al. We may add documentation about such other approaches later.

0 commit comments

Comments
 (0)