Skip to content

Regarding the deployment of postgres #16

@bizimunda

Description

@bizimunda

I was following your course on Udemy.
I have encountered an error while creating postgres-deoployment.
When we create postgres deployment, we cannot create it with without ENV parameter and otherwiese pod stays in crashLoopBackOff status.

So here is the code which works.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: postgres-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      component: postgres
  template:
    metadata:
      labels:
        component: postgres
    spec:
      containers:
      - name: postgres
        image: postgres
        ports:
        - containerPort: 5432
        env:
        - name: POSTGRES_HOST_AUTH_METHOD
          value: trust

You just need to add the env parameter and its values, initially to create it. But as we progress then we can change its value according to the course

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions