kubeedge / examples

Examples for KubeEdge
Apache License 2.0
246 stars 170 forks source link

use kubeedge-pi-counter-app.yaml problem? #151

Open SYanalyser opened 1 year ago

SYanalyser commented 1 year ago

environment: kubeedge-v1.13.0

add imagePullSecrets cat kubeedge-pi-counter-app.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    k8s-app: kubeedge-pi-counter
  name: kubeedge-pi-counter
  namespace: default
spec:
  selector:
    matchLabels:
      k8s-app: kubeedge-pi-counter
  template:
    metadata:
      labels:
        k8s-app: kubeedge-pi-counter
    spec:
      nodeName: edgenode-u39j
      nodeSelector:
        node-role.kubernetes.io/master: ""
      hostNetwork: true
      tolerations:
      - key: node-role.kubernetes.io/edge
        operator: Exists
        effect: NoSchedule
      containers:
      - name: kubeedge-pi-counter
        image: 172.26.161.130:30006/dev-test/kubeedge/kubeedge-counter-app:v1.0.0
        imagePullPolicy: IfNotPresent
      imagePullSecrets:
      - name: regcred
      nodeSelector:
        node-role.kubernetes.io/edge: ""
      restartPolicy: Always

`

kubectl logs kubeedge-pi-counter-6757859b6c-7wpw4 W0920 11:11:11.899378 1 client_config.go:608] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work. W0920 11:11:11.899610 1 client_config.go:613] error creating inClusterConfig, falling back to default config: unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined 2023/09/20 11:11:11 Failed to create KubeConfig, error : invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable

SYanalyser commented 1 year ago

looking for help

Lazy-Guys commented 11 months ago

Hi, you used a wrong image. ==>image: 172.26.161.130:30006/dev-test/kubeedge/kubeedge-counter-app:v1.0.0 It shoule be ended with kubeedge-pi-counter. Please check your deployment yaml :)

SYanalyser commented 11 months ago

@Lazy-Guys built it in the harbor. That has nothing to do with it。error: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable