Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a4f921e

Browse files
Kalyan Reddy DaidaKalyan Reddy Daida
Kalyan Reddy Daida
authored and
Kalyan Reddy Daida
committed
Welcome to Stack Simplify
1 parent 0ba5c36 commit a4f921e

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

‎05-Services-with-kubectl/README.md‎

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,30 @@ Observation: We don't need to specify "--type=ClusterIp" because default setting
3333
- Create a deployment for Frontend Application (Nginx acting as Reverse Proxy)
3434
- Create a NodePort service for load balancing frontend application.
3535
- **Important Note:** In Nginx reverse proxy, ensure backend service name `my-backend-service` is updated when you are building the frontend container. We already built it and put ready for this demo (stacksimplify/kube-frontend-nginx:1.0.0)
36+
- **Nginx Conf File**
37+
```conf
38+
server {
39+
listen 80;
40+
server_name localhost;
41+
location / {
42+
# Update your backend application Kubernetes Cluster-IP Service name and port below
43+
# proxy_pass http://<Backend-ClusterIp-Service-Name>:<Port>;
44+
proxy_pass http://my-backend-service:8080;
45+
}
46+
error_page 500 502 503 504 /50x.html;
47+
location = /50x.html {
48+
root /usr/share/nginx/html;
49+
}
50+
}
51+
```
3652
- **Docker Image Location:** https://hub.docker.com/repository/docker/stacksimplify/kube-frontend-nginx
3753
- **Frontend Nginx Reverse Proxy Application Source** [kube-frontend-nginx](../00-Docker-Images/03-kube-frontend-nginx)
3854
```
39-
# Create Deployment for Backend Rest App
55+
# Create Deployment for Frontend Nginx Proxy
4056
kubectl create deployment my-frontend-nginx-app --image=stacksimplify/kube-frontend-nginx:1.0.0
4157
kubectl get deploy
4258
43-
# Create ClusterIp Service for Backend Rest App
59+
# Create ClusterIp Service for Frontend Nginx Proxy
4460
kubectl expose deployment my-frontend-nginx-app --type=NodePort --port=80 --target-port=80 --name=my-frontend-service
4561
kubectl get svc
4662
@@ -55,22 +71,7 @@ kubectl scale --replicas=10 deployment/my-backend-rest-app
5571
# Test again to view the backend service Load Balancing
5672
http://<node1-public-ip>:<Node-Port>/hello
5773
```
58-
- **Nginx Conf File**
59-
```conf
60-
server {
61-
listen 80;
62-
server_name localhost;
63-
location / {
64-
# Update your backend application Kubernetes Cluster-IP Service name and port below
65-
# proxy_pass http://<Backend-ClusterIp-Service-Name>:<Port>;
66-
proxy_pass http://my-backend-service:8080;
67-
}
68-
error_page 500 502 503 504 /50x.html;
69-
location = /50x.html {
70-
root /usr/share/nginx/html;
71-
}
72-
}
73-
```
74+
7475

7576
## Pending Topics
7677
- We will look in tho these items when we progress in to course on that respective cloud provider

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /