我postgresql使用以下配置部署到 okteto:
然后我添加
annotations:
dev.okteto.com/auto-ingress: "true"
Run Code Online (Sandbox Code Playgroud)
到service/postgresql.
现在仪表板显示:
但如果我点击上面的链接,它就会显示my environment is ready...一些东西。如果我尝试将 URL 与管理员连接,就会失败。
提前致谢!
adminer在heroku上的部署可以连接到它而无需端口转发。目前我只能通过端口转发启用公共访问,如 okteto 日志所示:
kubectl port-forward --namespace your-namespace svc/postgresql 5432:5432 &
PGPASSWORD="$POSTGRES_PASSWORD" psql --host 127.0.0.1 -U okteto -d okteto -p 5432
Run Code Online (Sandbox Code Playgroud) 我希望可以征求您的建议。
\n简而言之,问题是:我的管道无法将私有镜像从 GHCR.IO 拉入 Okteto Kubernetes,但来自同一私有存储库的公共镜像可以工作。
\n我使用的是 Windows 10,使用 WSL2-Ubuntu 20.04 LTS 和 kinD 进行开发,也尝试过 minikube。
\n我在 Okteto 中收到错误,表示图像拉取为 \xe2\x80\x9cunauthorized\xe2\x80\x9d -> \xe2\x80\x9cimagePullBackOff\xe2\x80\x9d。
\n我所做的事情:浏览 Stack Overflow、RTFM、Okteto FAQ,下载 Okteto kubeconfig,费尽心思,花了比我愿意承认的更多的时间 \xe2\x80\x93 仍然没有成功。
\n无论出于何种原因,我无法创建有效的 \xe2\x80\x9ckubectl Secret\xe2\x80\x9d 。当通过 \xe2\x80\x9cdocker login --username\xe2\x80\x9d 登录到 ghcr.io 时,我可以在本地提取私有镜像。
\n无论我\xe2\x80\x99ve如何尝试,当尝试在Okteto中提取私有映像时,我仍然收到错误\xe2\x80\x9cunauthorized\xe2\x80\x9d。
\n我的设置与最新更新:
\n当我尝试使用以下定义在 Okteto Cloud 上创建一个持久卷时:
kind: PersistentVolume
apiVersion: v1
metadata:
name: postgres-pv
labels:
type: local
app: postgres
spec:
storageClassName: manual
capacity:
storage: 5Gi
accessModes:
- ReadWriteMany
hostPath:
path: "/mnt/data"
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "/v1, Resource=persistentvolumes", GroupVersionKind: "/v1, Kind=PersistentVolume"
Name: "postgres-pv", Namespace: ""
Object: &{map["apiVersion":"v1" "kind":"PersistentVolume" "metadata":map["annotations":map["kubectl.kubernetes.io/last-applied-configuration":""] "labels":map["app":"postgres" "type":"local"] "name":"postgres-pv"] "spec":map["accessModes":["ReadWriteMany"] "capacity":map["storage":"5Gi"] "hostPath":map["path":"/mnt/data"]]]}
from server for: "deploy/k8s.postgres.yml": persistentvolumes "postgres-pv" is forbidden: User "system:serviceaccount:okteto:07e6fdbf-55c2-4642-81e3-051e8309000f" cannot get resource "persistentvolumes" in API group "" at the cluster …Run Code Online (Sandbox Code Playgroud) postgresql kubernetes persistent-volumes persistent-volume-claims okteto