├── .gitignore ├── Badge └── Blahajnetes.png ├── Dockerfile ├── pod.yaml ├── service-local.yaml ├── app.js ├── index.html ├── package.json ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /Badge/Blahajnetes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashwinexe/GHW-December/HEAD/Badge/Blahajnetes.png -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:current-slim 2 | 3 | LABEL MAINTAINER="kumarashwin2603@gmail.com" 4 | 5 | COPY . /src 6 | 7 | RUN cd /src; npm install 8 | 9 | EXPOSE 8080 10 | 11 | CMD cd /src; node ./app.js -------------------------------------------------------------------------------- /pod.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: first-pod 5 | labels: 6 | event: ghw 7 | spec: 8 | containers: 9 | - name: node 10 | image: ashwinexe/ghw:1.0 11 | ports: 12 | - containerPort: 8080 -------------------------------------------------------------------------------- /service-local.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: svc-local 5 | spec: 6 | type: NodePort 7 | ports: 8 | - port: 8080 9 | protocol: TCP 10 | targetPort: 8080 11 | nodePort: 30000 12 | selector: 13 | event: ghw -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const path = require('path'); 3 | 4 | const app = express(); 5 | const port = process.env.PORT || 8080; 6 | 7 | // File will go here 8 | app.get('/', function(req, res){ 9 | res.sendFile(path.join(__dirname, '/index.html')); 10 | }); 11 | 12 | app.listen(port); 13 | console.log('Server started at http://localhost:' + port); -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 |Don't forget to Check In!
15 | 16 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ghw-december", 3 | "version": "1.0.0", 4 | "description": "packages for my website", 5 | "main": "app.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/ashwinexe/GHW-December.git" 12 | }, 13 | "author": "ashwinexe", 14 | "license": "ISC", 15 | "bugs": { 16 | "url": "https://github.com/ashwinexe/GHW-December/issues" 17 | }, 18 | "homepage": "https://github.com/ashwinexe/GHW-December#readme", 19 | "dependencies": { 20 | "express": "^4.18.2", 21 | "pug": "^3.0.2" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Ashwin Kumar Uppala 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GHW-December 🎅🎅 2 | Notes and resources for GHW December stream on **Deploying your first Kubernetes Cluster** 3 | 4 | Watch the recording of all three parts here: 5 | - [Part 1](https://www.youtube.com/watch?v=nRe0GqRkah4&t=4133s&pp=ygU5R2xvYmFsIEhhY2sgV2VlazogRGVwbG95aW5nIFlvdXIgZmlyc3QgS3ViZXJuZXRlcyBDbHVzdGVy ) 6 | - [Part 2](https://www.youtube.com/live/nRe0GqRkah4?feature=share) 7 | - [Part 3](https://www.youtube.com/live/N4kgxRERAZI?feature=share) 8 | 9 | ## Setting up 🖥️ 10 | 1. Install [Git](https://git-scm.com/) 11 | 2. Install [Node](https://nodejs.org/en/download/) 12 | 3. Install [Docker Desktop](https://www.docker.com/products/docker-desktop/) 13 | 4. Create an account on [Docker Hub](https://hub.docker.com/) 14 | 1. Login to Docker Desktop with your docker account 15 | 2. Login to Docker CLI `docker login` ([more info](https://docs.docker.com/engine/reference/commandline/login/)) 16 | 5. Clone this repo 17 | 1. https: `https://github.com/ashwinexe/GHW-December.git` 18 | 2. ssh: `git@github.com:ashwinexe/GHW-December.git` 19 | 20 | ## Conterize your app 🚀 21 | 1. Check out the `Dockerfile` to understand what's happening 22 | 2. Login to your docker account in your shell `docker login` 23 | 3. Run `docker build -t