Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regarding the deployment of postgres #16

Open
bizimunda opened this issue Jun 16, 2023 · 0 comments
Open

Regarding the deployment of postgres #16

bizimunda opened this issue Jun 16, 2023 · 0 comments

Comments

@bizimunda
Copy link

bizimunda commented Jun 16, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant