Skip to content

Commit 0938092

Browse files
committed
Update Blog “exposing-an-application-using-ingress-and-tls-termination-on-kubernetes-in-hpe-greenlake-for-private-cloud-enterprise”
1 parent da7ad05 commit 0938092

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

content/blog/exposing-an-application-using-ingress-and-tls-termination-on-kubernetes-in-hpe-greenlake-for-private-cloud-enterprise.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,56 @@ Before starting, make sure you have the following:
3030
* The kubectl CLI tool, together with the kubeconfig file for accessing the K8s cluster
3131
* The optional openssl CLI tool, for validating the generated certificates
3232

33+
#### Configure Ingress
3334

35+
```shell
36+
$ cat ingress-simple-selfsigned.yaml
37+
apiVersion: networking.k8s.io/v1
38+
kind: Ingress
39+
metadata:
40+
name: nginx-ingress-selfsigned
41+
annotations:
42+
ingress.kubernetes.io/ssl-redirect: "true"
43+
#kubernetes.io/ingress.class: "nginx"
44+
cert-manager.io/issuer: "cfe-selfsinged-issuer"
45+
spec:
46+
ingressClassName: nginx
47+
tls:
48+
- hosts:
49+
- nginx.example.com
50+
secretName: cfe-tls-key-pair
51+
rules:
52+
- host: nginx.example.com
53+
http:
54+
paths:
55+
- path: /
56+
pathType: Prefix
57+
backend:
58+
service:
59+
name: nginx-main
60+
port:
61+
number: 80
62+
```
3463

3564

65+
```shell
66+
$ k apply -f ingress-simple-selfsigned.yaml -n cfe-apps
67+
ingress.networking.k8s.io/nginx-ingress-selfsigned created
68+
```
69+
70+
71+
72+
```shell
73+
$ k apply -f ingress-simple-selfsigned.yaml -n cfe-apps
74+
ingress.networking.k8s.io/nginx-ingress-selfsigned created
75+
```
76+
77+
78+
79+
```shell
80+
$ host nginx.example.com
81+
nginx.example.com has address 10.6.115.251
82+
```
3683

3784
![](/img/nginx-private.png)
3885

0 commit comments

Comments
 (0)