O'Reilly logo

Implementing Modern DevOps by David Gonzalez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Deploying a pod

As mentioned earlier, Kubernetes relies heavily on Yet Another Markup Language (YAML) files to configure API elements. In order to deploy a pod, we need to create a yaml file, but first, just create a folder called deployments, where we are going to create all the descriptors that we will be created on this section. Create a file called pod.yaml (or pod.yml) with the following content:

apiVersion: v1kind: Podmetadata:  name: nginx  labels:    name: nginxspec:  containers:  - name: nginx     image: nginx     ports:      - containerPort: 80     resources:       requests:         memory: "64Mi"         cpu: "250m"

As you can see, the preceding yaml is fairly descriptive, but some points need clarification:

  • apiVersion: This is the version of the Kubernetes API that we are ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required