docker run --rm \
-v /private/var/services/prism:/root/apis \
-p 4010:4010 \
-t stoplight/prism \
mock -h 0.0.0.0 /root/apis/emass.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"Title": "Do Not Allow SSH Environment Options", | |
"Rule": "xccdf_org.ssgproject.content_rule_sshd_do_not_permit_user_env", | |
"Result": "pass" | |
}, | |
{ | |
"Title": "Enable PAM", | |
"Rule": "xccdf_org.ssgproject.content_rule_sshd_enable_pam", | |
"Result": "pass" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "NFT Token Schema", | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"Title": { | |
"type": "string", | |
"description": "Title of the vulnerability scan result" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install podman | |
❯❯ brew install podman | |
# initializes a new Linux runtime envirounment which known as podman machine | |
# podman behind the scene uses quem emulator to provide linux runtem envirounment | |
# --cpus 4 (specify cpus) | |
# --memory=6144 (specify memory) | |
❯❯ podman machine init --cpus 4 --memory=6144 | |
# list podman machines |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create endpoints | |
kubectl apply -f endpoint1.yaml | |
kubectl apply -f endpoint2.yaml | |
# create two services | |
❯❯ kubectl get svc | |
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE | |
bassa ClusterIP None <none> 5432/TCP 10m | |
rahasak ClusterIP None <none> 5432/TCP 12m |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: monitoring.coreos.com/v1 | |
kind: ServiceMonitor | |
metadata: | |
name: blackbox-exporter | |
spec: | |
endpoints: | |
- interval: 1m | |
path: /probe | |
scrapeTimeout: 10s | |
params: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
app.kubernetes.io/name: bassa | |
app.kubernetes.io/component: blackbox | |
name: bassa | |
spec: | |
clusterIP: None | |
ports: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
app.kubernetes.io/name: rahasak | |
app.kubernetes.io/component: blackbox | |
name: rahasak | |
spec: | |
clusterIP: None | |
ports: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run service monitory | |
kubectl apply -f servicemonitor.yaml | |
❯❯ kubectl get servicemonitors | grep blackbox-exporter | |
blackbox-exporter 69m | |
# access prometheus ui via port-forward | |
❯❯ kubectl port-forward svc/prom-kube-prometheus-stack-prometheus 9090:9090 | |
Forwarding from 127.0.0.1:9090 -> 9090 | |
Forwarding from [::1]:9090 -> 9090 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run nginx | |
kubectl apply -f nginx1.yaml | |
kubectl apply -f nginx2.yaml | |
❯❯ kubectl get pods | grep nginx | |
nginx1 1/1 Running 0 64m | |
nginx2 1/1 Running 0 62m | |
❯❯ kubectl get svc | grep nginx | |
nginx1 LoadBalancer 10.110.184.190 <pending> 80:32198/TCP 65m |