【发布时间】:2022-08-02 19:19:25
【问题描述】:
在 GCP 中使用 PostgreSQL 托管 drupal 这是我的资源:
我试图输入我的外部 IP 以查看门户但收到 403 Forbidden 错误。像这样:
我尝试了kubectl create clusterrolebinding cluster-system-anonymous --clusterrole=cluster-admincl --user=system:anonymous 命令来配置角色,但它不起作用。作为一名学生,我只是在学习这些东西,我不明白这些东西是如何工作的。
任何人都可以帮我简要解释一下它是如何不工作的以及是什么原因造成的?
Postgres 部署文件:
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres-deployment
labels:
app: postgres
spec:
replicas: 1
selector:
matchLabels:
app: postgres
template:
metadata:
labels:
app: postgres
spec:
containers:
- name: postgres
image: postgres:latest
ports:
- containerPort: 3306
volumeMounts:
- mountPath: \"/var/lib/postgres\"
subPath: \"postgres\"
name: postgres-data
env:
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: postgres-secrets
key: USER_NAME
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgres-secrets
key: ROOT_PASSWORD
volumes:
- name: postgres-data
persistentVolumeClaim:
claimName: task-pv-claim
标签: postgresql kubernetes google-cloud-platform drupal http-status-code-403