Hello from the host !!!
14 |This page is being served by mounting the html folder containing this index.html from your local machine into the Minikube virtual machine, from there is being mounted into the container running in your pod.
16 |├── Chapter03 ├── cli-hello-world-storage.yml ├── cli-hello-world.yml └── html │ └── index.html ├── Chapter04 ├── hello-world │ ├── hello-name.py │ ├── hello.py │ └── test.py ├── serverless-event │ ├── .gitignore │ ├── handler.py │ ├── package.json │ └── serverless.yml └── twitter │ ├── requirements.txt │ └── tweet.py ├── Chapter05 ├── blog │ ├── blogcount.js │ └── split.js ├── hello-world │ ├── LICENSE │ └── src │ │ └── hello.js └── twitter │ └── twitter.yml ├── Chapter08 ├── guestbook │ ├── add.py │ ├── cleanup.sh │ ├── get.py │ ├── redis.yaml │ └── run.sh ├── slack │ └── kubeEventsSlack.js ├── weather │ └── weather.js └── whale │ └── whalesay.sh ├── Chapter10 └── oms-daemonset.yaml ├── LICENSE └── README.md /Chapter03/cli-hello-world-storage.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: cli-hello-world-storage 5 | spec: 6 | selector: 7 | app: cli-hello-world-storage 8 | type: NodePort 9 | ports: 10 | - protocol: TCP 11 | port: 9000 12 | targetPort: 80 13 | --- 14 | apiVersion: apps/v1beta1 15 | kind: Deployment 16 | metadata: 17 | name: cli-hello-world-storage 18 | labels: 19 | app: nginx 20 | spec: 21 | replicas: 1 22 | selector: 23 | matchLabels: 24 | app: cli-hello-world-storage 25 | template: 26 | metadata: 27 | labels: 28 | app: cli-hello-world-storage 29 | spec: 30 | volumes: 31 | - name: html 32 | hostPath: 33 | path: /data/html 34 | containers: 35 | - name: nginx 36 | image: nginx:latest 37 | ports: 38 | - containerPort: 80 39 | volumeMounts: 40 | - mountPath: /usr/share/nginx/html 41 | name: html -------------------------------------------------------------------------------- /Chapter03/cli-hello-world.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: cli-hello-world 5 | spec: 6 | selector: 7 | app: cli-hello-world 8 | type: NodePort 9 | ports: 10 | - protocol: TCP 11 | port: 8000 12 | targetPort: 80 13 | --- 14 | apiVersion: apps/v1beta1 15 | kind: Deployment 16 | metadata: 17 | name: cli-hello-world 18 | labels: 19 | app: nginx 20 | spec: 21 | replicas: 1 22 | selector: 23 | matchLabels: 24 | app: cli-hello-world 25 | template: 26 | metadata: 27 | labels: 28 | app: cli-hello-world 29 | spec: 30 | containers: 31 | - name: nginx 32 | image: nginx:latest 33 | ports: 34 | - containerPort: 80 -------------------------------------------------------------------------------- /Chapter03/html/index.html: -------------------------------------------------------------------------------- 1 | 2 |
This page is being served by mounting the html folder containing this index.html from your local machine into the Minikube virtual machine, from there is being mounted into the container running in your pod.
16 |