-
Notifications
You must be signed in to change notification settings - Fork 1
/
hpe-ezmeral-runtime.cheat
49 lines (27 loc) · 2.17 KB
/
hpe-ezmeral-runtime.cheat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
; -------------------------------------------------------
; This file contains cheatsheet for HPE Ezmeral Runtime
; -------------------------------------------------------
% ezmeral runtime, kubernetes, service
# Expose service from gateway
kubectl label service <service> -n <namespace> hpecp.hpe.com/hpecp-internal-gateway=true
$ namespace: kubectl get ns --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}'
$ service: kubectl get service -n <namespace> --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}'
% ezmeral runtime, kubernetes, service
# List all exposed services
kubectl get svc -A -l hpecp.hpe.com/hpecp-internal-gateway=true
% ezmeral runtime, kubernetes, service
# List all exposed services in a given namespace
kubectl get svc -n <namespace> -l hpecp.hpe.com/hpecp-internal-gateway=true
$ namespace: kubectl get ns --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}'
% ezmeral runtime, kubernetes, service, url
# Get exposed service url
kubectl get svc <service> -n <namespace> -o custom-columns="NAME":.metadata.name,"SSL PORT":.metadata.annotations.hpecp-internal-gateway\/443,"NON-SSL PORT":.metadata.annotations.hpecp-internal-gateway\/80
$ namespace: kubectl get ns --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}'
$ service: kubectl get service -n <namespace> -l hpecp.hpe.com/hpecp-internal-gateway=true --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}'
% ezmeral runtime, kubernetes, service, url
# Get all exposed services url in a given namespace
kubectl get svc -n <namespace> -l hpecp.hpe.com/hpecp-internal-gateway=true -o custom-columns="NAME":.metadata.name,"SSL PORT":.metadata.annotations.hpecp-internal-gateway\/443,"NON-SSL PORT":.metadata.annotations.hpecp-internal-gateway\/80
$ namespace: kubectl get ns --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}'
% ezmeral runtime, kubernetes, service, url
# Get all exposed services urls
kubectl get svc -A -l hpecp.hpe.com/hpecp-internal-gateway=true -o custom-columns="NAMESPACE":.metadata.namespace,"NAME":.metadata.name,"SSL PORT":.metadata.annotations.hpecp-internal-gateway\/443,"NON-SSL PORT":.metadata.annotations.hpecp-internal-gateway\/80