Core concepts of Kubernetes

Before diving back into MyEvents, let's take a more thorough look at some of Kubernetes' core concepts. We will start by creating a new Pod that contains a simple NGINX web server.

Kubernetes resources (such as Pods and Services) are usually defined in YAML files that declaratively describe the desired state of your cluster (similar to the Docker Compose configuration files that you have worked with before). For our new NGINX Pod, create a new file named nginx-pod.yaml anywhere in your local filesystem:

apiVersion: v1 
kind: Pod 
metadata: 
  name: nginx-test 
spec: 
  containers: 
  - name: nginx 
    image: nginx 
    ports: 
      - containerPort: 80 
        name: http 
        protocol: TCP 

This so-called manifest file describes what your new Pod should ...

Get Cloud Native programming with Golang now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.