Estudio de CKAD – Día 15

Día 15 he flojeado, pero a recuperar porque falta justo un mes para mi examen.


Create a pod called sega with two containers:
Container 1: name tails with image busybox and command: sleep 3600
Container 2: Name sonic with image nginx and Environment variable NGINX_PORT with value 8080.


Bueno creo que mi trabajo peleandome con Openshift diariamente para configurarlo en intranet esta apoyando

Hoy aprendi, o practique la parte de Env y Container que siempre olvido el formato.

Busque en algunas paginas del mismo k8 (que puedo hacer en la prueba)

https://kubernetes.io/docs/concepts/workloads/pods

https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container

Y este es el codigo resultante


#actividad 15
# Create a pod called sega with two containers:
# Container 1: name tails with image busybox and command: sleep 3600
# Container 2: Name sonic with image nginx and Environment variable NGINX_PORT with value 8080.
---
apiVersion: v1
kind: Pod
metadata:
  name: sega
spec:
  containers: 
    - name: sonic
      image: nginx
      env:
      - name: NGINX_PORT
        value: '8080'
    - name: tails
      image: busybox
      command: ['sleep', '3600']

Algo sencillo por hoy