1. Deploying Hello World Web App with Docker & Kubernetes in DigitalOcean
Автор: Linus Hall
Загружено: 2025-08-27
Просмотров: 77
Описание:
Chapters
0:00 Intro
0:23 Step 1 – Terminal: clone the repository and go through the resources
2:04 Step 2 – Terminal: build a docker image
3:10 Step 3 – Terminal: test the docker image
4:05 Step 4 – DigitalOcean: create a new project
4:43 Step 5 – DigitalOcean: create a new container registry
6:30 Step 6 – DigitalOcean: Generate a new API token
7:36 Step 7 – Terminal: Login into DigitalOcean Command Line Interface (doctl)
8:09 Step 8 – Terminal: Login into DigitalOcean Registry
8:48 Step 9 – Terminal: build a new image for platform linux/amd64 and tag it and push it to DigitalOcean image registry
10:38 Step 10 – DigitalOcean: create a new kubernetes cluster
11:58 Step 11 – Terminal: login the new kubernetes cluster
12:25 Step 12 – Terminal: check the new kubernetes cluster
13:15 Step 13 – DigitalOcean: connect the kubernetes cluster with docker registry
14:05 Step 14 – Terminal: deploy my stack (pod, service, ingress)
16:21 Step 15 – Terminal: install ingress-nginx
16:39 Step 16 – Terminal: check the ingress-nginx
17:49 Step 17 – Cloudflare: add DNS record
18:58 Step 18 – Check the web page is alive
19:13 Step 19 – What's next
Steps
Step 1 – Terminal: clone the repository and go through the resources
```bash
git clone [email protected]:linushall/web-app-tutorial.git
```
Step 2 – Terminal: build a docker image
```bash
docker build -t my-hello-world .
```
Step 3 – Terminal: test the docker image
```bash
docker run -p 8080:80 my-hello-world
```
Open `http://localhost:8080`
Step 4 – DigitalOcean: create a new project
Step 5 – DigitalOcean: create a new container registry
Step 6 – DigitalOcean: Generate a new API token
Name: doctl
Expiration: 90 days
Scopes:
image
registry
kubernetes
Step 7 – Terminal: Login into DigitalOcean Command Line Interface (doctl)
```bash
doctl auth init
```
Step 8 – Terminal: Login into DigitalOcean Registry
```bash
doctl registry login
```
Step 9 – Terminal: build a new image for platform linux/amd64 and tag it and push it to DigitalOcean image registry
```bash
docker buildx build --platform linux/amd64 -t registry.digitalocean.com/web-app-registry-frankfurt/my-hello-world:1.0.0 --push .
```
Step 10 – DigitalOcean: create a new kubernetes cluster
Step 11 – Terminal: login the new kubernetes cluster
```bash
doctl kubernetes cluster kubeconfig save x-y-z
```
Step 12 – Terminal: check the new kubernetes cluster
```bash
kubectl config get-contexts
kubectl cluster-info
kubectl version
kubectl get nodes
kubectl get pods
```
Step 13 – DigitalOcean: connect the kubernetes cluster with docker registry
Step 14 – Terminal: deploy my stack (pod, service, ingress)
```bash
kubectl apply -f deployment.yaml
```
Step 15 – Terminal: install ingress-nginx
```bash
kubectl apply -f https://raw.githubusercontent.com/kub...
```
Step 16 – Terminal: check the ingress-nginx
```bash
kubectl get pods -n ingress-nginx
```
Step 17 – Cloudflare: add DNS records
---------------------
Type: A
Name: www
IPv4 address: YOUR-NGINX-EXTERNAL-IP
---------------------
Type: A
Name: @
IPv4 address: YOUR-NGINX-EXTERNAL-IP
Step 18 – Check the web page is alive
Step 19 – What's next
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: