Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- kind: Deployment
- apiVersion: apps/v1
- metadata:
- name: testapp
- spec:
- replicas: 1
- selector:
- matchLabels:
- app: testapp
- template:
- metadata:
- labels:
- app: testapp
- spec:
- containers:
- - name: testapp
- image: >-
- <path to repo>
- imagePullPolicy: Always
- args:
- - /bin/sh
- - -c
- - >
- i=0;
- while true;
- do
- echo "$i: $(date)" >> /var/log/1.log;
- echo "$(date) INFO $i" >> /var/log/2.log;
- i=$((i+1));
- sleep 1;
- done
- volumeMounts:
- - name: varlog
- mountPath: /var/log
- - name: count-log-1
- image: <path to repo>
- args: [/bin/sh, -c, 'tail -n+1 -F /var/log/1.log']
- volumeMounts:
- - name: varlog
- mountPath: /var/log
- - name: count-log-2
- image: <path to repo>
- args: [/bin/sh, -c, 'tail -n+1 -F /var/log/2.log']
- volumeMounts:
- - name: varlog
- mountPath: /var/log
- env:
- - name: SECRET_USERNAME
- <some secrets>
- ports:
- - containerPort: 80
- volumes:
- - name: varlog
- emptyDir: {}
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: testapp
- annotations:
- service.beta.kubernetes.io/azure-load-balancer-internal: "true"
- spec:
- type: LoadBalancer
- selector:
- app: testapp
- ports:
- - name: http
- port: 80
- targetPort: 80
- protocol: TCP
Advertisement
Add Comment
Please, Sign In to add comment