我在deployment.yaml文件中使用ImagePullSecrets配置GCR时遇到问题.由于许可,它无法下载容器
Failed to pull image "us.gcr.io/optimal-jigsaw-185903/syncope-deb": rpc error: code = Unknown desc = Error response from daemon: denied: Permission denied for "latest" from request "/v2/optimal-jigsaw-185903/syncope-deb/manifests/latest".
Run Code Online (Sandbox Code Playgroud)
我确信我做错了但我遵循了这个教程(和其他人一样),但仍然没有运气.
https://ryaneschinger.com/blog/using-google-container-registry-gcr-with-minikube/
pod日志同样没用:
"syncope-deb" in pod "syncope-deployment-64479cdcf5-cng57" is waiting to start: trying and failing to pull image
Run Code Online (Sandbox Code Playgroud)
我的部署如下:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
# Unique key of the Deployment instance
name: syncope-deployment
namespace: default
spec:
# 3 Pods should exist at all times.
replicas: 1
# Keep record of 2 revisions for rollback
revisionHistoryLimit: 2 …Run Code Online (Sandbox Code Playgroud) service-accounts kubernetes google-container-registry minikube
我正在尝试启动本地Kubernetes集群minikube start并获取以下错误.
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
E0912 17:39:12.486830 17689 start.go:305] Error restarting
cluster: restarting kube-proxy: waiting for kube-proxy to be
up for configmap update: timed out waiting for the condition
Run Code Online (Sandbox Code Playgroud)
知道如何确保它开始吗?我正在使用VirtualBox和本教程.我试过这里给出的小费,但没有运气.
还有任何具体的原因,为什么需要这么长时间才能达到这个阶段?或者它通常这么慢?
malik@malik:~$ minikube start\n minikube v1.12.0 on Ubuntu 18.04\n\xe2\x9c\xa8 Using the docker driver based on existing profile\n Starting control plane node minikube in cluster minikube\n minikube 1.12.1 is available! Download it: https://github.com/kubernetes/minikube/releases/tag/v1.12.1\n To disable this notice, run: \'minikube config set WantUpdateNotification false\'\n\n Pulling base image ...\n Downloading Kubernetes v1.18.3 preload ...\nE0727 07:25:35.757871 14015 cache.go:63] save image to file "k8s.gcr.io/kube-apiserver:v1.18.3" -> "/home/malik/.minikube/cache/images/k8s.gcr.io/kube-apiserver_v1.18.3" failed: write: Get https://k8s.gcr.io/v2/kube-apiserver/blobs/sha256:83b4483280e5187b2801b449338d5755e5874ab80c44bf1ce615d258142e7c8b: dial tcp: lookup k8s.gcr.io: no such host\nE0727 07:25:35.757643 14015 cache.go:63] save image to file "k8s.gcr.io/coredns:1.6.7" -> …Run Code Online (Sandbox Code Playgroud) 使用minikube通过kubernetes api进行kubernetes集群设置的正确方法是什么?目前,我找不到可以访问kubernetes集群的端口.
我正在尝试运行提交带有 k8s 集群的 spark 应用程序的基本示例。
我使用 spark 文件夹中的脚本创建了我的 docker 镜像:
sudo ./bin/docker-image-tool.sh -mt spark-docker build
sudo docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
spark-r spark-docker 793527583e00 17 minutes ago 740MB
spark-py spark-docker c984e15fe747 18 minutes ago 446MB
spark spark-docker 71950de529b3 18 minutes ago 355MB
openjdk 8-alpine 88d1c219f815 15 hours ago 105MB
hello-world latest fce289e99eb9 3 months ago 1.84kB
Run Code Online (Sandbox Code Playgroud)
然后尝试提交 SparkPi 示例(如官方文档中所示)。
./bin/spark-submit \
--master k8s://[MY_IP]:8443 \
--deploy-mode cluster \
--name spark-pi --class org.apache.spark.examples.SparkPi \
--driver-memory 1g …Run Code Online (Sandbox Code Playgroud) 嗨,我正在尝试开始minikube,这就是我跑的原因
minikube start --vm-driver=none
Run Code Online (Sandbox Code Playgroud)
但它在控制台中显示以下几行:
minikube v1.9.2 on Amazon 2 (Xen/amd64) 使用基于用户配置的 none 驱动程序 X 抱歉,Kubernetes v1.18.0 需要在 root 路径中安装 conntrack
请注意,我已经安装kubectl minikube和docker。
请帮我解决这个问题。
我最近开始在Mac上本地使用Minikube学习Kubernetes.以前,我能够使用Minikube 0.10.0启动本地Kubernetes集群,创建部署并查看Kubernetes仪表板.
昨天我试图删除集群并从头开始重新做一切.但是,我发现无法部署资产,无法查看仪表板.从我看到的情况来看,在容器创建期间,一切似乎都被卡住了.
跑完之后minikube start,据报道
Starting local Kubernetes cluster...
Kubectl is now configured to use the cluster.
Run Code Online (Sandbox Code Playgroud)
当我跑kubectl get pods --all-namespaces,它报告(注意STATUS列):
kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system kube-addon-manager-minikube 0/1 ContainerCreating 0 51s
Run Code Online (Sandbox Code Playgroud)
docker ps 没有显示:
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
Run Code Online (Sandbox Code Playgroud)
minikube status 告诉我VM和集群正在运行:
minikubeVM: Running
localkube: Running
Run Code Online (Sandbox Code Playgroud)
如果我尝试创建部署和自动规划器,我被告知它们已成功创建:
kubectl create -f configs
deployment "hello-minikube" created
horizontalpodautoscaler "hello-minikube-autoscaler" created
$ kubectl get pods --all-namespaces
NAMESPACE NAME READY …Run Code Online (Sandbox Code Playgroud) 我目前正在尝试在Minikube上部署以下内容.我使用配置文件将主机路径用作minikube节点上的持久存储.
apiVersion: v1
kind: PersistentVolume
metadata:
name: "pv-volume"
spec:
capacity:
storage: "20Gi"
accessModes:
- "ReadWriteOnce"
hostPath:
path: /data
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: "orientdb-pv-claim"
spec:
accessModes:
- "ReadWriteOnce"
resources:
requests:
storage: "20Gi"
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: orientdbservice
spec:
#replicas: 1
template:
metadata:
name: orientdbservice
labels:
run: orientdbservice
test: orientdbservice
spec:
containers:
- name: orientdbservice
image: orientdb:latest
env:
- name: ORIENTDB_ROOT_PASSWORD
value: "rootpwd"
ports:
- containerPort: 2480
name: orientdb
volumeMounts:
- name: orientdb-config
mountPath: /data/orientdb/config
- …Run Code Online (Sandbox Code Playgroud) 编辑 - 这是在 OSX 上另外,我试过运行minikube service <service-name>,如下所示,当它尝试在浏览器中打开它时,我收到“连接被拒绝”信号,因为端口已关闭。
我有一个 kubernetes 部署,在使用--driver=virtualbox. 我将其翻译为使用--driver=docker,这几乎有效,除非我执行以下操作
$ minikube service websocket-nodeport
|-----------|--------------------|-------------|-------------------------|
| NAMESPACE | NAME | TARGET PORT | URL |
|-----------|--------------------|-------------|-------------------------|
| default | websocket-nodeport | 9000 | http://172.17.0.4:30007 |
|-----------|--------------------|-------------|-------------------------|
Starting tunnel for service websocket-nodeport.
|-----------|--------------------|-------------|------------------------|
| NAMESPACE | NAME | TARGET PORT | URL |
|-----------|--------------------|-------------|------------------------|
| default | websocket-nodeport | | http://127.0.0.1:62032 |
|-----------|--------------------|-------------|------------------------|
Opening service default/websocket-nodeport in default browser...
? Because you are using …Run Code Online (Sandbox Code Playgroud) 我想看看目前是否可以在 2020 M1 MacBook air 上本地运行 Kubernetes。
我需要的环境比较简单,只是为了看一些教程。举个例子,这个操作符-sdk 指南。
到目前为止,我已经尝试过microk8s和minikube,因为它们是我之前在其他机器上使用过的工具。
对于这两个,我brew在打开终端应用程序“with Rosetta 2”(即像这样)后安装了它们。我的进度是:
Minikube
当我运行时minikube start --driver=docker(已经安装了Docker Desktop for M1的技术预览版),出现初始化错误。在我看来,这里正在跟踪https://github.com/kubernetes/minikube/issues/9224。
Microk8s
microk8s install要求安装multipass,然后出现错误An error occurred with the instance when trying to start with 'multipass': returned exit code 2. Ensure that 'multipass' is setup correctly and try again.。Multipass 显示microk8s-vm卡在启动中。我认为这可能与这个问题有关https://github.com/canonical/multipass/issues/1857。
我知道我可能会更好地追查这些问题以寻求有关这些特定错误的帮助。如果目前可以/建议设置基本的 Kubernetes 环境以在 M1 mac …
kubernetes ×10
minikube ×10
amazon-ec2 ×1
apache-spark ×1
devops ×1
docker ×1
kubectl ×1
linux ×1
microk8s ×1
shell ×1
terminal ×1