https://github.com/hashfyre/k8s-tutes
Set of Kubernetes configs intended for tutorials.
https://github.com/hashfyre/k8s-tutes
k8s kubernetes-tutorials
Last synced: 2 months ago
JSON representation
Set of Kubernetes configs intended for tutorials.
- Host: GitHub
- URL: https://github.com/hashfyre/k8s-tutes
- Owner: Hashfyre
- License: mit
- Created: 2017-05-20T17:12:02.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-20T04:25:25.000Z (about 7 years ago)
- Last Synced: 2025-02-27T03:12:31.788Z (3 months ago)
- Topics: k8s, kubernetes-tutorials
- Language: Shell
- Size: 24.4 KB
- Stars: 4
- Watchers: 1
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kubernetes Tutorials
A Set of graded Kubernetes tutorials to document self-progress and help peers
### Credits
- Borrowed unabashedly from [janakiramm/kubernetes-101](https://github.com/janakiramm/kubernetes-101/tree/master/Docker)
- Not forked as I intend to create a step by step guide for myself and others in a single repo
- [github/rmenn](https://github.com/rmenn) for the mentorship### Build a Docker image
Replace `DOCKER_HUB_USER` with your Docker Hub username.```
cd Docker
docker build -t /web .
docker push /web
```### Launch the app with Docker Compose
```
docker-compose up -d
```### Test the app
```
curl localhost:5000
```### Setup Minikube
[macOS / OS X: Minikube](minikube.md)### 101: Pods exposed as Services
```
cd ../101-pod-service
kubectl create -f db-pod.yml
kubectl create -f db-svc.yml
kubectl create -f web-pod.yml
kubectl create -f web-svc.yml
```### 102: Pods with ReplicaSet exposed as Services
WIP### 103: Deployments exposed as Services
```
cd ../103-deployment-replicas-service
kubectl create -f db-dpl.yml
kubectl create -f db-svc.yml
kubectl create -f web-dpl.yml
kubectl create -f web-svc.yml
```### Check that the Pods and Services are created
```
kubectl get pods
kubectl get svc
```### Get the NodePort for the web Service. Make a note of the port.
```
kubectl describe svc web
```### Test the app by using minkube service url
```
minikube service web --url
```