You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
blogcontent/kubernetes-resources.yml

41 lines
903 B

apiVersion: v1
kind: Service
metadata:
name: blog-svc
namespace: blog
spec:
selector:
role: app
ports:
- port: 8080
nodePort: 30080
type: LoadBalancer
---
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:
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: "gitea.scubbo.org/scubbo/blog_nginx:built_in_ci"
imagePullPolicy: 'Always'
resources:
requests:
cpu: 10m