Skip to content

Instantly share code, notes, and snippets.

@mcornea
Created September 29, 2021 13:21
Show Gist options
  • Save mcornea/1b4e873ec7f1a0ef72f48224aad2f453 to your computer and use it in GitHub Desktop.
Save mcornea/1b4e873ec7f1a0ef72f48224aad2f453 to your computer and use it in GitHub Desktop.
test-deployment
---
apiVersion: v1
kind: Namespace
metadata:
name: testns
---
apiVersion: v1
kind: ConfigMap
metadata:
name: index-html-configmap
namespace: testns
data:
index.html: |
<html>
<h1>Welcome</h1>
</br>
<h1>Hi! This is a configmap Index file </h1>
</html
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-world
namespace: testns
spec:
replicas: 20
selector:
matchLabels:
app: f5-hello-world
template:
metadata:
labels:
app: f5-hello-world
spec:
containers:
- env:
- name: service_name
value: f5-hello-world
image: registry.kni-qe-0.lab.eng.rdu2.redhat.com:5000/rhscl/httpd-24-rhel7:latest
imagePullPolicy: Always
name: f5-hello-world
ports:
- containerPort: 8080
protocol: TCP
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 5
livenessProbe:
httpGet:
path: /
port: 8080
failureThreshold: 1
periodSeconds: 10
resources:
limits:
cpu: "2"
memory: 100M
requests:
cpu: "2"
memory: 100M
volumeMounts:
- name: html-index-file
mountPath: /var/www/html/
volumes:
- name: html-index-file
configMap:
name: index-html-configmap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment