Last active
February 7, 2023 23:02
-
-
Save ganesh-karthick/0e35593ef6c25378dd176aab6129e372 to your computer and use it in GitHub Desktop.
PgAdmin Kubernetes service depoyment example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
kubectl create -f pgadmin.yaml | |
sleep 15s | |
kubectl logs pgadmin-76gjgvvjh-yghg | |
## Access pgAdmin | |
## https://<IP>:31560 | |
## username/password: [email protected] / password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
app: pgadmin | |
name: pgadmin | |
namespace: default | |
spec: | |
ports: | |
- name: padmin-port | |
nodePort: 30165 | |
port: 80 | |
targetPort: 80 | |
selector: | |
app: pgadmin | |
type: NodePort | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: pgadmin | |
namespace: default | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: pgadmin | |
template: | |
metadata: | |
labels: | |
app: pgadmin | |
spec: | |
containers: | |
- env: | |
- name: PGADMIN_DEFAULT_EMAIL | |
value: [email protected] | |
- name: PGADMIN_DEFAULT_PASSWORD | |
value: password | |
- name: PGADMIN_PORT | |
value: "80" | |
image: dpage/pgadmin4:3.6 | |
imagePullPolicy: IfNotPresent | |
name: pgadmin | |
ports: | |
- containerPort: 80 | |
resources: | |
limits: | |
memory: 4096Mi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment