Skip to content

Instantly share code, notes, and snippets.

@vranystepan
Last active July 12, 2022 13:23
Show Gist options
  • Save vranystepan/befb3b02efbd29ff65ee7e31d4030519 to your computer and use it in GitHub Desktop.
Save vranystepan/befb3b02efbd29ff65ee7e31d4030519 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: ConfigMap
metadata:
name: app
data:
CONFIG_SOME_VALUE_1: value1
---
apiVersion: v1
data:
CONFIG_SOME_SECRET_VALUE_1: c2VjcmV0MQ==
kind: Secret
metadata:
name: app
type: Opaque
apiVersion: apps/v1
kind: Deployment
metadata:
name: app
labels:
app: app
spec:
replicas: 2
selector:
matchLabels:
app: app
template:
metadata:
labels:
app: app
spec:
containers:
- name: app
image: docker.io/vranystepan/workshop-app:working
ports:
- containerPort: 8080
envFrom:
- configMapRef:
name: app
- secretRef:
name: app
volumeMounts:
- name: config
mountPath: /etc/config
volumes:
- name: config
configMap:
name: app
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: app
spec:
ingressClassName: nginx
rules:
- host: stepan-vrany.s01.training.eks.rocks
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: app
port:
number: 80
apiVersion: v1
kind: Service
metadata:
name: app
spec:
selector:
app: app
ports:
- protocol: TCP
port: 80
targetPort: 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment