Skip to content

Commit 8513764

Browse files
final updates for helm lp
1 parent 750af20 commit 8513764

2 files changed

Lines changed: 44 additions & 18 deletions

File tree

content/learning-paths/servers-and-cloud-computing/helm-on-gcp/nginx-helm.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ my-nginx/
2626
└── templates/
2727
```
2828

29+
### Clean templates
30+
31+
The default Helm chart includes several files that aren't required for a basic Redis deployment. Remove the following files from `my-nginx/templates/` to avoid unnecessary complexity and template errors: ingress.yaml, hpa.yaml, serviceaccount.yaml, tests/, NOTES.txt, and httproute.yaml.
32+
33+
```console
34+
cd ./my-nginx/templates
35+
rm -rf hpa.yaml ingress.yaml serviceaccount.yaml tests/ NOTES.txt httproute.yaml
36+
cd $HOME/helm-microservices
37+
```
38+
39+
Only ngnix-specific templates will be maintained.
40+
2941
### Configure values.yaml
3042

3143
Replace the contents of `my-nginx/values.yaml` with the following to define configurable parameters including the NGINX image, service type, and public port:
@@ -92,21 +104,17 @@ A LoadBalancer provides a public IP required for browser access and is a common
92104
### Install & Access
93105

94106
```console
107+
cd $HOME/helm-microservices
95108
helm install nginx ./my-nginx
96109
```
97110

98111
```output
99112
NAME: nginx
100-
LAST DEPLOYED: Tue Jan 6 07:55:52 2026
113+
LAST DEPLOYED: Tue Jan 20 20:07:47 2026
101114
NAMESPACE: default
102115
STATUS: deployed
103116
REVISION: 1
104-
NOTES:
105-
1. Get the application URL by running these commands:
106-
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
107-
You can watch its status by running 'kubectl get --namespace default svc -w nginx-my-nginx'
108-
export SERVICE_IP=$(kubectl get svc --namespace default nginx-my-nginx --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")
109-
echo http://$SERVICE_IP:80
117+
TEST SUITE: None
110118
```
111119

112120
### Access NGINX from a browser
@@ -120,11 +128,11 @@ kubectl get svc
120128
Wait until **EXTERNAL-IP** is assigned.
121129

122130
```output
123-
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
124-
kubernetes ClusterIP 34.118.224.1 <none> 443/TCP 3h22m
125-
nginx-my-nginx LoadBalancer 34.118.239.19 34.63.103.125 80:31501/TCP 52s
126-
postgres-app-my-postgres ClusterIP 34.118.225.2 <none> 5432/TCP 13m
127-
redis-my-redis ClusterIP 34.118.234.155 <none> 6379/TCP 6m53s
131+
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
132+
kubernetes ClusterIP 34.118.224.1 <none> 443/TCP 42m
133+
nginx-my-nginx LoadBalancer 34.118.238.110 34.61.85.5 80:30954/TCP 69s
134+
postgres-app-my-postgres ClusterIP 34.118.233.240 <none> 5432/TCP 27m
135+
redis-my-redis ClusterIP 34.118.229.221 <none> 6379/TCP 8m24s
128136
```
129137

130138
Open the external IP in your browser:

content/learning-paths/servers-and-cloud-computing/helm-on-gcp/redis-helm.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ my-redis/
2929

3030
### Clean templates
3131

32-
The default Helm chart includes several files that aren't required for a basic Redis deployment. Remove the following files from `my-redis/templates/` to avoid unnecessary complexity and template errors: ingress.yaml, hpa.yaml, serviceaccount.yaml, tests/, and NOTES.txt.
32+
The default Helm chart includes several files that aren't required for a basic Redis deployment. Remove the following files from `my-redis/templates/` to avoid unnecessary complexity and template errors: ingress.yaml, hpa.yaml, serviceaccount.yaml, tests/, NOTES.txt, and httproute.yaml.
3333

3434
```console
3535
cd ./my-redis/templates
36-
rm -rf hpa.yaml ingress.yaml serviceaccount.yaml tests/ NOTES.txt
36+
rm -rf hpa.yaml ingress.yaml serviceaccount.yaml tests/ NOTES.txt httproute.yaml
3737
cd $HOME/helm-microservices
3838
```
3939

@@ -113,9 +113,15 @@ ClusterIP is used because Redis is intended for internal communication only with
113113
Install Redis and validate that it's running and responding correctly:
114114

115115
```console
116+
cd $HOME/helm-microservices
116117
helm install redis ./my-redis
118+
```
119+
120+
Confirm that the redis pod is operating:
121+
122+
```console
123+
kubectl get pods
117124
kubectl get svc
118-
kubectl exec -it <redis-pod> -- redis-cli ping
119125
```
120126

121127
You should see an output similar to:
@@ -124,13 +130,25 @@ NAME READY STATUS RESTARTS AGE
124130
postgres-app-my-postgres-6dbc8759b6-jgpxs 1/1 Running 0 6m38s
125131
redis-my-redis-75c88646fb-6lz8v 1/1 Running 0 13s
126132
127-
>kubectl get svc
128-
redis-my-redis ClusterIP 34.118.234.155 <none> 6379/TCP 6m14s
133+
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
134+
kubernetes ClusterIP 34.118.224.1 <none> 443/TCP 37m
135+
postgres-app-my-postgres ClusterIP 34.118.233.240 <none> 5432/TCP 22m
136+
redis-my-redis ClusterIP 34.118.229.221 <none> 6379/TCP 3m19s
137+
```
138+
139+
Finally, execute a sample ping via redis:
129140

130-
> kubectl exec -it redis-my-redis-75c88646fb-6lz8v -- redis-cli ping
141+
```console
142+
kubectl exec -it <redis-pod> -- redis-cli ping
143+
```
144+
145+
You should see an output similar to:
146+
147+
```output
131148
PONG
132149
```
133150

151+
134152
The Redis pod should be in **Running** state and the service should be **ClusterIP** type.
135153

136154
## What you've accomplished and what's next

0 commit comments

Comments
 (0)