Skip to content

Commit eb9a1e9

Browse files
committed
Update Blog “deploying-super-mario-game-on-kubernetes-in-hpe-greenlake-for-private-cloud-enterprise”
1 parent 493cc84 commit eb9a1e9

File tree

1 file changed

+33
-8
lines changed

1 file changed

+33
-8
lines changed

content/blog/deploying-super-mario-game-on-kubernetes-in-hpe-greenlake-for-private-cloud-enterprise.md

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ Before starting, make sure you have the following:
3232
* A domain and a list of subdomains to generate the SSL certificate and host the applications in the cluster
3333
* The optional *openssl* CLI tool, for validating the generated certificates
3434

35-
### Deploy Super Mario game
35+
### Deploy Super Mario
3636

37-
*Super Mario*, together with *Tetris*, can be deployed to the cluster using the YAML manifest files from the GitHub repo [k8s-games](https://github.com/GuopingJia/k8s-games):
37+
The game *Super Mario*, together with *Tetris*, can be deployed to the cluster using the YAML manifest files from the GitHub repo [k8s-games](https://github.com/GuopingJia/k8s-games):
3838

3939
```shell
4040
$ tree k8s-games/
@@ -50,7 +50,6 @@ k8s-games/
5050

5151
Type the following commands to deploy the game *Super Mario* and *Tetris* to the namespace *cfe-games*:
5252

53-
5453
```shell
5554
$ kubectl create ns cfe-games
5655
namespace/cfe-games created
@@ -64,7 +63,7 @@ deployment.apps/tetris-deployment created
6463
service/tetris-service created
6564
```
6665

67-
Type the command shown below to check the details of game deployment:
66+
Type the command shown below to check the details of the game deployment:
6867

6968
```shell
7069
$ kubectl get all -n cfe-games
@@ -87,7 +86,9 @@ replicaset.apps/mario-deployment-96f79d8f 2 2 2 24s
8786
replicaset.apps/tetris-deployment-86d744fb47 2 2 2 12s
8887
```
8988

90-
Two games, *mario* and *tetris*, are deployed as the *ClusterIP* type, each running with 2 Pod replicas. They provide internal connectivity and can solely be accessed from within the cluster.
89+
Two games, *mario* and *tetris*, are deployed as the *ClusterIP* type, each running with 2 Pod replicas as default. They provide internal connectivity and can solely be accessed from within the cluster.
90+
91+
You can configure the Horizontal Pod Autoscaling (HPA) in the cluster by using the K8s *HorizontalPodAutoscaler* resource. It will automatically scale the workload by deploying more Pods in the cluster according to application memory or CPU usage.
9192

9293
Type the following commend to check that all the game service endpoints have been populated:
9394

@@ -127,11 +128,31 @@ NAME DESIRED CURRENT READY AGE
127128
replicaset.apps/controller-57b4fdc957 1 1 1 18d
128129
```
129130

131+
By running the following commands, you can see a range of virtual IP addresses, *"10.6.115.251-10.6.115.254"*, defined in the CRD resource *IPAddressPool*, and the layer 2 service IP address announcement in the CRD resource *L2Advertisement*:
132+
133+
134+
```shell
135+
$ kubectl get ipaddresspools -n metallb-system
136+
NAME AUTO ASSIGN AVOID BUGGY IPS ADDRESSES
137+
cfe-pool true false ["10.6.115.251-10.6.115.254"]
138+
139+
140+
141+
$ kubectl get l2advertisements -n metallb-system
142+
NAME IPADDRESSPOOLS IPADDRESSPOOL SELECTORS INTERFACES
143+
cfe-l2advert ["cfe-pool"]
144+
```
145+
130146
### Deploy Nginx Ingress controller
131147

132-
In order for an Ingress to work in the cluster, there must be an Ingress controller being deployed and running. It's the Ingress controller that accesses the certificate and the routing rules defined on the Ingress resource and makes them part of its configuration.
148+
149+
In order for an Ingress to work in the cluster, there must be an Ingress controller being deployed and running. It's the Ingress controller that accesses the certificate and the routing rules defined on the Ingress resource and makes them part of its configuration.
150+
151+
152+
153+
A variety of Ingress controllers are available for deployment in the cluster, including [Traefik](https://doc.traefik.io/traefik/providers/kubernetes-ingress/), [HAProxy](https://github.com/haproxytech/kubernetes-ingress#readme) and [Nginx Ingress controller](https://www.nginx.com/products/nginx-ingress-controller/). Execute the command below to install the Nginx Ingress controller to the cluster using helm:
154+
133155

134-
A variety of Ingress controllers are available for deployment in the cluster, including [Traefik](https://doc.traefik.io/traefik/providers/kubernetes-ingress/), [HAProxy](https://github.com/haproxytech/kubernetes-ingress#readme) and [Nginx Ingress controller](https://www.nginx.com/products/nginx-ingress-controller/). Execute the command below to install the Nginx Ingress controller to the cluster using helm:
135156

136157
```shell
137158
$ helm upgrade --install ingress-nginx ingress-nginx \
@@ -205,10 +226,14 @@ NAME DESIRED CURRENT READY
205226
replicaset.apps/ingress-nginx-controller-5957546d75 1 1 1 15d
206227
```
207228

229+
The service *ingress-nginx-controller* gets deployed as the service type of *LoadBalancer* with the *EXTERNAL-IP* assigned as *10.6.115.251*. This IP address will be used for setting up domain and subdomain name resolution.
230+
208231
### Generate a self-signed certificate using cert-manager
209232

210233

211-
You can deploy cert-manager to the K8s cluster and generate a self-signed certificate by following up the blog post [Generating self-signed certificates using cert-manager](https://developer.hpe.com/blog/generating-self-signed-certificates-using-cert-manager-for-kubernetes-in-hpe-greenlake-for-private-cloud-entreprise/).
234+
You can deploy cert-manager to the K8s cluster and generate a self-signed certificate by following up the blog post [Generating self-signed certificates using cert-manager](https://developer.hpe.com/blog/generating-self-signed-certificates-using-cert-manager-for-kubernetes-in-hpe-greenlake-for-private-cloud-entreprise/).
235+
236+
212237

213238
Here is the deployed cert-manager to the namespace *cert-manager* in the cluster:
214239

0 commit comments

Comments
 (0)