37 lines
960 B
YAML
37 lines
960 B
YAML
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
|