add k3s stuff
This commit is contained in:
parent
711213c510
commit
15638464c7
8 changed files with 144 additions and 1 deletions
20
clusters/k3s/cert-manager/cert-manager-issuer.yml
Normal file
20
clusters/k3s/cert-manager/cert-manager-issuer.yml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
apiVersion: cert-manager.io/v1
|
||||
kind: ClusterIssuer
|
||||
metadata:
|
||||
name: letsencrypt-prod
|
||||
spec:
|
||||
acme:
|
||||
email: graham@vntx.net
|
||||
server: https://acme-v02.api.letsencrypt.org/directory
|
||||
privateKeySecretRef:
|
||||
name: letsencrypt
|
||||
solvers:
|
||||
# - dns01:
|
||||
# cloudflare:
|
||||
# email: graham@vntx.net
|
||||
# apiTokenSecretRef:
|
||||
# name: cloudflare-api-token-secret
|
||||
# key: api-token
|
||||
- http01:
|
||||
ingress:
|
||||
class: nginx
|
||||
13
clusters/k3s/dashboard/dashboard.admin-user-role.yml
Normal file
13
clusters/k3s/dashboard/dashboard.admin-user-role.yml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: admin-user
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: cluster-admin
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: admin-user
|
||||
namespace: kubernetes-dashboard
|
||||
|
||||
6
clusters/k3s/dashboard/dashboard.admin-user.yml
Normal file
6
clusters/k3s/dashboard/dashboard.admin-user.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: admin-user
|
||||
namespace: kubernetes-dashboard
|
||||
|
||||
38
clusters/k3s/ip/ip-deployment.yml
Normal file
38
clusters/k3s/ip/ip-deployment.yml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: ip-deployment
|
||||
namespace: default
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ip
|
||||
replicas: 3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ip
|
||||
spec:
|
||||
containers:
|
||||
- name: ip
|
||||
image: gmcintire/ip:1
|
||||
ports:
|
||||
- name: epmd
|
||||
containerPort: 4369
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
- name: NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: ERLANG_COOKIE
|
||||
value: uo19C55ukGpQvxJgpB
|
||||
- name: RELEASE_COOKIE
|
||||
value: uo19C55ukGpQvxJgpB
|
||||
- name: SECRET_KEY_BASE
|
||||
value: SuyR3VcELGFJzE9acYzdkpcyG74VT2TLz+WsIw1Sndtp3JSd5/IblaIEeaG9dy6u
|
||||
imagePullPolicy: Always
|
||||
19
clusters/k3s/ip/ip-headless.yml
Normal file
19
clusters/k3s/ip/ip-headless.yml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ip-headless
|
||||
namespace: default
|
||||
spec:
|
||||
selector:
|
||||
app: ip
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: https
|
||||
port: 4000
|
||||
targetPort: 4000
|
||||
protocol: TCP
|
||||
- name: epmd
|
||||
port: 4369
|
||||
targetPort: 4369
|
||||
protocol: TCP
|
||||
29
clusters/k3s/ip/ip-ingress.yml
Normal file
29
clusters/k3s/ip/ip-ingress.yml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
## More detailed template
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: ip-deployment
|
||||
namespace: default
|
||||
labels:
|
||||
app.kubernetes.io/name: ip-deployment
|
||||
app.kubernetes.io/instance: ip-deployment
|
||||
app.kubernetes.io/version: "1"
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- ip.vntx.net
|
||||
secretName: ip-deployment-ingress-secret
|
||||
rules:
|
||||
- host: ip.vntx.net
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: ip-service
|
||||
port:
|
||||
number: 4000
|
||||
18
clusters/k3s/ip/ip-service.yml
Normal file
18
clusters/k3s/ip/ip-service.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ip-service
|
||||
namespace: default
|
||||
spec:
|
||||
selector:
|
||||
app: ip
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: https
|
||||
port: 4000
|
||||
targetPort: 4000
|
||||
protocol: TCP
|
||||
- name: epmd
|
||||
port: 4369
|
||||
targetPort: 4369
|
||||
protocol: TCP
|
||||
|
|
@ -7,7 +7,7 @@ spec:
|
|||
selector:
|
||||
matchLabels:
|
||||
app: ip
|
||||
replicas: 3
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue