I have been in DevOps related jobs for past 6 years dealing mainly with Kubernetes in AWS and on-premise as well. I spent quite a lot …
:date_long | 1 min Read
Multi-Container Pods
apiVersion: v1
kind: Pod
metadata:
labels:
name: app
name: app
namespace: elastic-stack
spec:
containers:
- image: kodekloud/event-simulator
name: app
volumeMounts:
- mountPath: /log
name: log-volume
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: default-token-7lfvx
readOnly: true
- image: kodekloud/filebeat-configured
name: sidecar
volumeMounts:
- mountPath: /var/log/event-simulator/
name: log-volume
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: default-token-7lfvx
readOnly: true
serviceAccount: default
serviceAccountName: default
volumes:
- hostPath:
path: /var/log/webapp
type: DirectoryOrCreate
name: log-volume
- name: default-token-7lfvx
secret:
defaultMode: 420
secretName: default-token-7lfvx