Tag Archives: pod Error

[Solved] Error: Could not get apiVersions from Kubernetes

question:

Having trouble deploying pods

# helm install chart.tgz
Error: Could not get apiVersions from Kubernetes: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: the server is currently unable to handle the request

Solution:

Find the offending apiservice and delete it.

//View the problematic apiservice
# kubectl get apiservice
NAME                                   SERVICE                          AVAILABLE                      
v1.                                    Local                            True       
v1.admissionregistration.k8s.io        Local                            True      
v1.apiextensions.k8s.io                Local                            True     
v1.apps                                Local                            True     
v1.authentication.k8s.io               Local                            True     
v1.authorization.k8s.io                Local                            True   
v1.autoscaling                         Local                            True 
v1.batch                               Local                            True
v1.coordination.k8s.io                 Local                            True
v1.crd.projectcalico.org               Local                            True
v1.networking.k8s.io                   Local                            True
v1.rbac.authorization.k8s.io           Local                            True
v1.scheduling.k8s.io                   Local                            True
v1.storage.k8s.io                      Local                            True
v1beta1.admissionregistration.k8s.io   Local                            True
v1beta1.apiextensions.k8s.io           Local                            True
v1beta1.authentication.k8s.io          Local                            True 
v1beta1.authorization.k8s.io           Local                            True
v1beta1.batch                          Local                            True
v1beta1.certificates.k8s.io            Local                            True
v1beta1.coordination.k8s.io            Local                            True 
v1beta1.discovery.k8s.io               Local                            True 
v1beta1.events.k8s.io                  Local                            True  
v1beta1.extensions                     Local                            True
v1beta1.metrics.k8s.io                 default/unm-k8s-metrics-server   False (FailedDiscoveryCheck)    <<< 删除
v1beta1.networking.k8s.io              Local                            True 
v1beta1.node.k8s.io                    Local                            True 
v1beta1.policy                         Local                            True 
v1beta1.rbac.authorization.k8s.io      Local                            True 
v1beta1.scheduling.k8s.io              Local                            True 
v1beta1.storage.k8s.io                 Local                            True 
v2beta1.autoscaling                    Local                            True  
v2beta2.autoscaling                    Local                            True  

//Delete the problematic apiservice
# kubectl delete apiservice v1beta1.metrics.k8s.io
apiservice.apiregistration.k8s.io "v1beta1.metrics.k8s.io" deleted

[Solved] pod Error: back off restarting failed container

pod Error: back off restarting failed container

 

Solution:

1. Find the corrosponding deployment
2. Add command: [ “/bin/bash”, “-ce”, “tail -f /dev/null” ]
as following:

kind: Deployment
apiVersion: apps/v1beta2
metadata:
  labels:
    app: jenkins-master
  name: jenkins-master-deploy
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jenkins-master
  template:
    metadata:
      labels:
        app: jenkins-master
    spec:
      containers:
      - name: jenkins-master
        image: drud/jenkins-master:v0.29.0
        imagePullPolicy: IfNotPresent
        command: [ "/bin/bash", "-ce", "tail -f /dev/null" ]
        volumeMounts:
        - mountPath: /var/jenkins_home/
          name: masterjkshome
        ports:
        - containerPort: 8080
      volumes:
      - name: masterjkshome
        persistentVolumeClaim:
          claimName: pvcjkshome

How to Solve pod Error: “Authentication token is invalid or unverified. Either verify it with the email that…”

The following error occurs when executing pod trunk push:

[!] Authentication token is invalid or unverified. Either verify it with the email that was sent or register a new session.

Solution:

1. Execute the command: pod trunk register ‘your mailbox’, ‘XXXXXX’ — description =’xxxx ‘   Re register your account
2. Find and open the verification link in your email
3. Return to the terminal and execute the command again: pod trunk push xxxxx.podspec — allow warnings