我第一次尝试在我的笔记本电脑上运行 Minikube v1.19.0,使用 Docker 作为驱动程序,但没有成功。以下是执行日志:
\nPS C:\\Users\\______\\kubernetes> minikube start --driver=docker --alsologtostderr\nI0916 19:01:44.059272 20464 out.go:278] Setting OutFile to fd 96 ...\nI0916 19:01:44.059272 20464 out.go:291] Setting ErrFile to fd 100...\nW0916 19:01:44.091562 20464 root.go:292] Error reading config file at C:\\Users\\proskos\\.minikube\\config\\config.json: open C:\\Users\\proskos\\.minikube\\config\\config.json: The system cannot find the file specified.\nI0916 19:01:44.097634 20464 out.go:285] Setting JSON to false\nI0916 19:01:44.110479 20464 start.go:108] hostinfo: {"hostname":"--------","uptime":118298,"bootTime":1631689806,"procs":291,"os":"windows","platform":"Microsoft Windows 10 Enterprise","platformFamily":"Standalone Workstation","platformVersion":"10.0.18363 Build 18363","kernelVersion":"10.0.18363 Build 18363","kernelArch":"x86_64","virtualizationSystem":"","virtualizationRole":"","hostId":"---------------"}\nW0916 19:01:44.110479 20464 start.go:116] gopshost.Virtualization returned error: not implemented yet\nI0916 19:01:44.113153 20464 out.go:157] minikube …
Run Code Online (Sandbox Code Playgroud) 我有一个运行着多个永久性磁盘用于存储的 GKE 集群。为了设置临时环境,我在同一项目中创建了第二个集群。现在我想在登台集群中使用生产集群的永久磁盘中的数据。
我已经为临时集群创建了永久性磁盘。将生产数据移动到临时集群磁盘的最佳方法是什么?
persistent-storage google-cloud-platform kubernetes google-kubernetes-engine
我有一个 postgres 部署,其配置如下
apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
metadata:
name: hippo
spec:
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:centos8-13.5-0
postgresVersion: 13
users:
- name: hippo
databases: ["hippo"]
options: "CREATEDB"
instances:
- name: instance1
dataVolumeClaimSpec:
accessModes:
- "ReadWriteOnce"
resources:
requests:
storage: 1Gi
backups:
pgbackrest:
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:centos8-2.36-0
repos:
- name: repo1
volume:
volumeClaimSpec:
accessModes:
- "ReadWriteOnce"
resources:
requests:
storage: 1Gi
Run Code Online (Sandbox Code Playgroud)
我将本地端口 5432 转发给它,就像这样
DB_PORT=5432
PG_CLUSTER_PRIMARY_POD=$(microk8s kubectl get pod -o name \
-l postgres-operator.crunchydata.com/cluster=hippo,postgres-operator.crunchydata.com/role=master)
microk8s kubectl port-forward "${PG_CLUSTER_PRIMARY_POD}" ${DB_PORT}:${DB_PORT}
Run Code Online (Sandbox Code Playgroud)
然后我可以通过 psql 连接。我可以列出数据库并连接到 hippo 数据库。
rob@rob-Vostro-5402:~$ psql postgresql://hippo:Zw%5EAQuPf%3D%3Bi%3B%3F2%3E1RRbLTLrT@localhost:5432/hippo
psql (13.7 …
Run Code Online (Sandbox Code Playgroud)