Deployment-Service-Ingress Example

If you want to release your application on the Internet

Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: web-deployment
  labels:
    app: my-web
spec:
  replicas: 3
  selector:
    matchLabels:
      app: my-web
  template:
    metadata:
      labels:
        app: my-web
    spec:
      containers:
      - name: web
        image: localhost:5000/author/web-image:latest
        ports:
        - containerPort: 5000
      imagePullSecrets:
      - name: myregistrykey

Service

Ingress

Nginx Ingress controller install

Ingress annotations cheat sheet

Last updated