Skip to content

Instantly share code, notes, and snippets.

@tsuyopon-xyz
Created November 5, 2020 06:18
Show Gist options
  • Save tsuyopon-xyz/7666da6c1abf303dec065100721b9320 to your computer and use it in GitHub Desktop.
Save tsuyopon-xyz/7666da6c1abf303dec065100721b9320 to your computer and use it in GitHub Desktop.
Memo for kubernetes config files.
apiVersion: apps/v1
kind: Deployment
metadata:
name: second-app-deployment
spec:
replicas: 1
selector:
matchLabels:
app: second-app
tier: backend
template:
metadata:
labels:
app: second-app
tier: backend
spec:
containers:
- name: second-node
image: duyoji/kub-first-app:2
livenessProbe:
httpGet:
path: /
port: 8080
periodSeconds: 10
initialDelaySeconds: 5
# resources:
# requests:
# memory: '64Mi'
# cpu: '250m'
# limits:
# memory: '128Mi'
# cpu: '500m'
apiVersion: v1
kind: Service
metadata:
name: backend
spec:
selector:
app: second-app
ports:
- protocol: 'TCP'
port: 80
targetPort: 8080
# - protocol: 'TCP'
# port: 443
# targetPort: 443
type: LoadBalancer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment