Created
November 27, 2020 17:14
-
-
Save dallasmarlow/8331aea82f78da7d340c4f76c68ae2c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: composers | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
k8s-app: composers | |
namespace: composers | |
name: composers | |
spec: | |
selector: | |
matchLabels: | |
app.kubernetes.io/name: composers | |
replicas: 1 | |
revisionHistoryLimit: 5 | |
template: | |
metadata: | |
annotations: | |
seccomp.security.alpha.kubernetes.io/pod: runtime/default | |
labels: | |
app.kubernetes.io/name: composers | |
k8s-app: composers | |
spec: | |
containers: | |
- image: dallasmarlow/composers | |
imagePullPolicy: Always | |
livenessProbe: | |
failureThreshold: 3 | |
httpGet: | |
path: /health | |
port: primary | |
scheme: HTTP | |
initialDelaySeconds: 1 | |
periodSeconds: 1 | |
name: composers | |
ports: | |
- containerPort: 8080 | |
name: primary | |
readinessProbe: | |
failureThreshold: 3 | |
httpGet: | |
path: /health | |
port: primary | |
scheme: HTTP | |
initialDelaySeconds: 1 | |
periodSeconds: 1 | |
resources: | |
limits: | |
cpu: "1" | |
memory: "64Mi" | |
requests: | |
cpu: "1" | |
memory: "64Mi" | |
securityContext: | |
allowPrivilegeEscalation: false | |
readOnlyRootFilesystem: true | |
runAsGroup: 1 # daemon group for debian based containers | |
runAsUser: 1 # daemon user ... ^ | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
k8s-app: composers | |
kubernetes.io/cluster-service: 'true' | |
namespace: composers | |
name: composers | |
spec: | |
ports: | |
- port: 80 | |
targetPort: 8080 | |
protocol: TCP | |
selector: | |
app.kubernetes.io/name: composers | |
type: ClusterIP | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
labels: | |
k8s-app: composers | |
namespace: composers | |
name: composers-internal | |
annotations: | |
alb.ingress.kubernetes.io/load-balancer-attributes: "access_logs.s3.enabled=true,access_logs.s3.bucket=dmarlow-lb-logs,access_logs.s3.prefix=composers" | |
alb.ingress.kubernetes.io/scheme: internal | |
alb.ingress.kubernetes.io/target-type: ip | |
kubernetes.io/ingress.class: alb | |
spec: | |
rules: | |
- http: | |
paths: | |
- path: /* | |
backend: | |
serviceName: composers | |
servicePort: 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment