Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apiVersion: v1
- kind: Pod
- metadata:
- name: task6pod
- labels:
- app: nginx-sidecar
- spec:
- volumes:
- - name: message-volume
- emptyDir: {}
- containers:
- - name: busybox
- image: busybox
- command: ["sh", "-c", "echo 'hello from the cluster' > /messages/index.html && sleep infinity"]
- volumeMounts:
- - name: message-volume
- mountPath: /messages
- - name: nginx-sidecar
- image: nginx:latest
- volumeMounts:
- - name: message-volume
- mountPath: /usr/share/nginx/html
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: nginx-nodeport-service
- labels:
- app: nginx-sidecar
- spec:
- type: NodePort
- selector:
- app: nginx-sidecar
- ports:
- - protocol: TCP
- port: 80
- targetPort: 80
- nodePort: 30000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement