我已经构建了docker镜像并将其推送到github软件包。我正在使用GCP UI在现有的gke群集中部署此映像。
所有选项均为默认选项。
存储库提供程序,我从下拉列表中选择github。
图片名称GCP在填充的图片名称下自动填充gcr.io/some-gcp-project/github.com/githubuser/cso:$SHORT_SHA
。
Kubernetes部署yaml文件:
---
apiVersion: "apps/v1"
kind: "Deployment"
metadata:
name: "cso"
namespace: "default"
labels:
app: "cso"
spec:
replicas: 3
selector:
matchLabels:
app: "cso"
template:
metadata:
labels:
app: "cso"
spec:
containers:
- name: "cso-1"
image: "gcr.io/some-gcp-project/github.com/githubuser/cso:$SHORT_SHA"
---
apiVersion: "autoscaling/v2beta1"
kind: "HorizontalPodAutoscaler"
metadata:
name: "cso-hpa-o9ol"
namespace: "default"
labels:
app: "cso"
spec:
scaleTargetRef:
kind: "Deployment"
name: "cso"
apiVersion: "apps/v1"
minReplicas: 1
maxReplicas: 5
metrics:
- type: "Resource"
resource:
name: "cpu"
targetAverageUtilization: 80
有关如何进行调试的任何指南?