First contentful commit
This commit is contained in:
commit
9d5c9b53dc
3
README.md
Normal file
3
README.md
Normal file
@ -0,0 +1,3 @@
|
||||
Architecture for [this site](https://blog.scubbo.org/), image built from [here](https://gitea.scubbo.org/scubbo/blogcontent).
|
||||
|
||||
Created on 2025-02-26, migrating from a [now deprecated repo](https://gitea.scubbo.org/scubbo/blog-infrastructure) that I created long ago, when I knew much less about k8s setup than I do now. In particular - I didn't know that `kustomize` existed, and so had hacked-together my own implementation of the image-update functionality. Proud of myself for figuring out how to do so - but let's use the established tool now I know that it exists!
|
36
deployment.yaml
Normal file
36
deployment.yaml
Normal file
@ -0,0 +1,36 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: blog-deployment
|
||||
labels:
|
||||
role: app
|
||||
namespace: blog
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
role: app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
role: app
|
||||
spec:
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/arch
|
||||
operator: In
|
||||
values:
|
||||
- arm64
|
||||
containers:
|
||||
# Guidance on how to set up interaction with secure registry:
|
||||
# https://github.com/k3s-io/k3s/issues/1148#issuecomment-641687668
|
||||
# (Unique to rancher/k3s. On traditional k8s installs, I suspect https://github.com/kubernetes/kubernetes/issues/43924
|
||||
# is the way)
|
||||
- name: app
|
||||
image: image_name
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
11
kustomization.yaml
Normal file
11
kustomization.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
|
||||
images:
|
||||
- name: image_name
|
||||
newName: gitea.scubbo.org/scubbo/blogcontent
|
||||
newTag: 589aa1e202eec23c3dc2cceebd827385423a5d2d
|
14
service.yaml
Normal file
14
service.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: blog-svc-cip
|
||||
namespace: blog
|
||||
spec:
|
||||
ports:
|
||||
- port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
selector:
|
||||
role: app
|
||||
sessionAffinity: None
|
||||
type: ClusterIP
|
Loading…
x
Reference in New Issue
Block a user