Post

Game of Pods - App Gallery

Game of Pods - App Gallery

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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
for i in $(ls *.yaml); do echo filename: $i;echo "---" ;cat $i; done
filename: ingress.yaml
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: iron-gallery-ingress
spec:
  rules:
  - host: "iron-gallery-braavos.com"
    http:
      paths:
      - path: /
        backend:
          serviceName: iron-gallery-service
          servicePort: 80

filename: iron-db.yaml
---
apiVersion: apps/v1
kind: Deployment
metadata:
  creationTimestamp: null
  labels:
    app: iron-db
  name: iron-db
spec:
  replicas: 1
  selector:
    matchLabels:
      app: iron-db
  strategy: {}
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: iron-db
        db: mariadb
    spec:
      volumes:
      - name: db
        emptyDir: {}
      containers:
      - image: kodekloud/irondb:2.0
        name: irondb
        resources: {}
        volumeMounts:
        - name: db
          mountPath: '/var/lib/mysql'
        env:
        - name: MYSQL_ROOT_PASSWORD
          value: "Braavo"
        - name: MYSQL_DATABASE
          value: "lychee"
        - name: MYSQL_USER
          value: "lychee"
        - name: MYSQL_PASSWORD
          value: "lychee"

status: {}
filename: iron-gallery.yaml
---
apiVersion: apps/v1
kind: Deployment
metadata:
  creationTimestamp: null
  labels:
    app: iron-gallery
  name: iron-gallery
spec:
  replicas: 1
  selector:
    matchLabels:
      app: iron-gallery
  strategy: {}
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: iron-gallery
        run: iron-gallery
    spec:
      volumes:
      - name: config
        emptyDir: {}
      - name: images
        emptyDir: {}
      containers:
      - image: kodekloud/irongallery:2.0
        name: irongallery
        resources: {}
        volumeMounts:
        - name: config
          mountPath: '/usr/share/nginx/html/data'
        - name: images
          mountPath: '/usr/share/nginx/html/uploads'
status: {}
filename: netpol.yaml
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: iron-gallery-firewall
  namespace: default
spec:
  podSelector:
    matchLabels:
      db: mariadb
  policyTypes:
  - Ingress
  ingress:
  - from:
    - podSelector:
        matchLabels:
          run: iron-gallery
    ports:
    - protocol: TCP
      port: 3306
This post is licensed under CC BY 4.0 by the author.