Metrics Server InvalidImageName
What happened:
Metrics server pod in kube-system will not start.
Warning InspectFailed 1m (x7240 over 1d) kubelet, aks-pool1-36471421-1 Failed to apply default image tag "k8s-gcrio.azureedge.net/": couldn't parse image reference "k8s-gcrio.azureedge.net/": invalid reference format
What you expected to happen: Metrics server to start. Image name to be full and correct.
How to reproduce it (as minimally and precisely as possible): Not entirely sure but I have 2 clusters in this condition
Anything else we need to know?: apiVersion: v1 kind: Pod metadata: creationTimestamp: 2018-08-10T21:06:52Z generateName: metrics-server-5d549c4b98- labels: k8s-app: metrics-server pod-template-hash: "1810570654" name: metrics-server-5d549c4b98-jszlv namespace: kube-system ownerReferences:
- apiVersion: extensions/v1beta1 blockOwnerDeletion: true controller: true kind: ReplicaSet name: metrics-server-5d549c4b98 uid: 4de0211e-9ce1-11e8-bda7-7a84b688688d resourceVersion: "3947619" selfLink: /api/v1/namespaces/kube-system/pods/metrics-server-5d549c4b98-jszlv uid: 4de227b7-9ce1-11e8-bda7-7a84b688688d spec: containers:
- command:
- /metrics-server
- --source=kubernetes.summary_api:'' image: k8s-gcrio.azureedge.net/ imagePullPolicy: Always name: metrics-server resources: {} terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts:
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount name: metrics-server-token-dklvn readOnly: true dnsPolicy: ClusterFirst nodeName: aks-pool1-36471421-1 nodeSelector: beta.kubernetes.io/os: linux restartPolicy: Always schedulerName: default-scheduler securityContext: {} serviceAccount: metrics-server serviceAccountName: metrics-server terminationGracePeriodSeconds: 30 tolerations:
- effect: NoExecute key: node.kubernetes.io/not-ready operator: Exists tolerationSeconds: 300
- effect: NoExecute key: node.kubernetes.io/unreachable operator: Exists tolerationSeconds: 300 volumes:
- name: metrics-server-token-dklvn secret: defaultMode: 420 secretName: metrics-server-token-dklvn status: conditions:
- lastProbeTime: null lastTransitionTime: 2018-08-10T21:06:56Z status: "True" type: Initialized
- lastProbeTime: null lastTransitionTime: 2018-08-10T21:06:56Z message: 'containers with unready status: [metrics-server]' reason: ContainersNotReady status: "False" type: Ready
- lastProbeTime: null lastTransitionTime: 2018-08-10T21:06:52Z status: "True" type: PodScheduled containerStatuses:
- image: k8s-gcrio.azureedge.net/ imageID: "" lastState: {} name: metrics-server ready: false restartCount: 0 state: waiting: message: 'Failed to apply default image tag "k8s-gcrio.azureedge.net/": couldn''t parse image reference "k8s-gcrio.azureedge.net/": invalid reference format' reason: InvalidImageName hostIP: 10.161.176.4 phase: Pending podIP: 10.161.176.7 qosClass: BestEffort startTime: 2018-08-10T21:06:56Z
Environment:
- Kubernetes version (use
kubectl version): v1.10.3 - Size of cluster (how many worker nodes are in the cluster?): 3 nodes
- General description of workloads in the cluster (e.g. HTTP microservices, Java app, Ruby on Rails, machine learning, etc.): Microservices (message bus, no HTTP)
- Others:
Hi @strtdusty,
This is very odd. Are all of your other pods functioning as expected?
Would you please send your sub id, resource group, cluster name to [email protected]? Thank you.
Can confirm, I started encountering this today with a new cluster 1.10.5.
(kubernetes) kubernetes [master●●] % ksys describe deploy metrics-server
Name: metrics-server
Namespace: kube-system
CreationTimestamp: Mon, 13 Aug 2018 09:58:02 +0200
Labels: addonmanager.kubernetes.io/mode=EnsureExists
k8s-app=metrics-server
kubernetes.io/cluster-service=true
Annotations: deployment.kubernetes.io/revision=1
Selector: k8s-app=metrics-server
Replicas: 1 desired | 1 updated | 1 total | 0 available | 1 unavailable
StrategyType: RollingUpdate
MinReadySeconds: 0
RollingUpdateStrategy: 1 max unavailable, 1 max surge
Pod Template:
Labels: k8s-app=metrics-server
Service Account: metrics-server
Containers:
metrics-server:
Image: k8s.gcr.io/
Port: <none>
Host Port: <none>
Command:
/metrics-server
--source=kubernetes.summary_api:''
Environment: <none>
Mounts: <none>
Volumes: <none>
Conditions:
Type Status Reason
---- ------ ------
Available True MinimumReplicasAvailable
Progressing False ProgressDeadlineExceeded
OldReplicaSets: <none>
NewReplicaSet: metrics-server-658f7b496d (1/1 replicas created)
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal ScalingReplicaSet 14m deployment-controller Scaled up replica set metrics-server-658f7b496d to 1
Pay special attention to Image: k8s.gcr.io/
Then, obvious fail from pod:
(kubernetes) kubernetes [master●●] % ksys describe po metrics-server-658f7b496d-6rvlw
Name: metrics-server-658f7b496d-6rvlw
Namespace: kube-system
Node: aks-agentpool-14727962-0/10.85.4.5
Start Time: Mon, 13 Aug 2018 09:58:02 +0200
Labels: k8s-app=metrics-server
pod-template-hash=2149360528
Annotations: <none>
Status: Pending
IP: 10.245.3.14
Controlled By: ReplicaSet/metrics-server-658f7b496d
Containers:
metrics-server:
Container ID:
Image: k8s.gcr.io/
Image ID:
Port: <none>
Host Port: <none>
Command:
/metrics-server
--source=kubernetes.summary_api:''
State: Waiting
Reason: InvalidImageName
Ready: False
Restart Count: 0
Environment: <none>
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from metrics-server-token-b828h (ro)
Conditions:
Type Status
Initialized True
Ready False
PodScheduled True
Volumes:
metrics-server-token-b828h:
Type: Secret (a volume populated by a Secret)
SecretName: metrics-server-token-b828h
Optional: false
QoS Class: BestEffort
Node-Selectors: beta.kubernetes.io/os=linux
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 17m default-scheduler Successfully assigned metrics-server-658f7b496d-6rvlw to aks-agentpool-14727962-0
Normal SuccessfulMountVolume 17m kubelet, aks-agentpool-14727962-0 MountVolume.SetUp succeeded for volume "metrics-server-token-b828h"
Warning InspectFailed 7m (x49 over 17m) kubelet, aks-agentpool-14727962-0 Failed to apply default image tag "k8s.gcr.io/": couldn't parse image reference "k8s.gcr.io/": invalid reference format
Warning Failed 2m (x72 over 17m) kubelet, aks-agentpool-14727962-0 Error: InvalidImageName
I can confirm this issue. Seems that the exact image: k8s.gcr.io/ ist missing.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
creationTimestamp: 2018-08-13T09:05:21Z
generation: 1
labels:
addonmanager.kubernetes.io/mode: EnsureExists
k8s-app: metrics-server
kubernetes.io/cluster-service: "true"
name: metrics-server
namespace: kube-system
resourceVersion: "700513"
selfLink: /apis/extensions/v1beta1/namespaces/kube-system/deployments/metrics-server
uid: 01bf66f9-9ed8-11e8-99b8-e61d334e415f
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
k8s-app: metrics-server
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
k8s-app: metrics-server
name: metrics-server
spec:
containers:
- command:
- /metrics-server
- --source=kubernetes.summary_api:''
image: k8s.gcr.io/
imagePullPolicy: Always
name: metrics-server
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
nodeSelector:
beta.kubernetes.io/os: linux
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: metrics-server
serviceAccountName: metrics-server
terminationGracePeriodSeconds: 30
status:
conditions:
- lastTransitionTime: 2018-08-13T09:05:21Z
lastUpdateTime: 2018-08-13T09:05:21Z
message: Deployment has minimum availability.
reason: MinimumReplicasAvailable
status: "True"
type: Available
- lastTransitionTime: 2018-08-13T09:15:44Z
lastUpdateTime: 2018-08-13T09:15:44Z
message: ReplicaSet "metrics-server-658f7b496d" has timed out progressing.
reason: ProgressDeadlineExceeded
status: "False"
type: Progressing
observedGeneration: 1
replicas: 1
unavailableReplicas: 1
updatedReplicas: 1
Cluster information sent
Is this with new clusters or are you scaling an old cluster? I ask as I found a potential for this to happen with an old cluster on scale/add on changes. This shouldn't happen with a new cluster or upgraded cluster though.
We are seeing this too in at least one of our clusters. Will send information to the email listed above.
The cluster is about 30 days old. I did recently scale it.
On Mon, Aug 13, 2018, 4:23 PM Jack [email protected] wrote:
Is this with new clusters or are you scaling an old cluster? I ask as I found a potential for this to happen with an old cluster on scale/add on changes. This shouldn't happen with a new cluster or upgraded cluster though.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Azure/AKS/issues/597#issuecomment-412698894, or mute the thread https://github.com/notifications/unsubscribe-auth/AA91L4Sm8bq5KfkuyffdOOSq7eUTpiGPks5uQgpYgaJpZM4V5WdL .
Thank you to everyone who contributed to this issue. We will be rolling out a fix shortly.
Will an upgrade/scale be required to apply the fix?
On Mon, Aug 13, 2018, 5:39 PM Jarrod Skulavik [email protected] wrote:
Closed #597 https://github.com/Azure/AKS/issues/597.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Azure/AKS/issues/597#event-1786684233, or mute the thread https://github.com/notifications/unsubscribe-auth/AA91L59Z6AJFxnqjH5y_vKcbNNTENfqyks5uQhwygaJpZM4V5WdL .
Oops, I hit the wrong button, sorry about that. Yes @strtdusty, this will require that the add-on be removed then re-added. We will provide instructions here shortly. Thank you for your patience and again for the feedback regarding this issue
@JackQuincy got this with a brand new cluster yesterday
Can you provide a workaround in the meanwhile? Maybe manually editing the image tag could solve this issue (e.g. gcr.io/ google_containers/metrics-server-amd64:v0.2.1)
I am using k8s-gcrio.azureedge.net/metrics-server-amd64:v0.2.1 in my deployment as that seemed to be the most recent version that was deployed with AKS.
On Wed, Aug 15, 2018 at 6:35 AM Yves Vogl [email protected] wrote:
Can you provide a workaround in the meanwhile? Maybe manually editing the image tag could solve this issue (e.g. gcr.io/ google_containers/metrics-server-amd64:v0.2.1)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Azure/AKS/issues/597#issuecomment-413199131, or mute the thread https://github.com/notifications/unsubscribe-auth/AA91L9mUqC6qtIwrqlBUn2y7tCN0WrlHks5uRCOQgaJpZM4V5WdL .
+1, confirm seeing the same error, cluster was created like couple months ago, but upgraded this monday
Name: metrics-server-5d549c4b98-zqp68
Namespace: kube-system
Priority: 0
PriorityClassName: <none>
Node: aks-agentpool-32786983-0/10.240.0.4
Start Time: Mon, 20 Aug 2018 10:16:03 +0100
Labels: k8s-app=metrics-server
pod-template-hash=1810570654
Annotations: <none>
Status: Pending
IP: 10.244.3.8
Controlled By: ReplicaSet/metrics-server-5d549c4b98
Containers:
metrics-server:
Container ID:
Image: k8s-gcrio.azureedge.net/
Image ID:
Port: <none>
Host Port: <none>
Command:
/metrics-server
--source=kubernetes.summary_api:''
State: Waiting
Reason: InvalidImageName
Ready: False
Restart Count: 0
Environment: <none>
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from metrics-server-token-8p9lr (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
metrics-server-token-8p9lr:
Type: Secret (a volume populated by a Secret)
SecretName: metrics-server-token-8p9lr
Optional: false
QoS Class: BestEffort
Node-Selectors: beta.kubernetes.io/os=linux
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning InspectFailed 14m (x1021 over 3h) kubelet, aks-agentpool-32786983-0 Failed to apply default image tag "k8s-gcrio.azureedge.net/": couldn't parse image reference "k8s-gcrio.azureedge.net/": invalid reference format
Warning Failed 4m (x1066 over 3h) kubelet, aks-agentpool-32786983-0 Error: InvalidImageName
@FLemon Same here. And my container works well after patching to deploy/metrics-server like this.
- image: k8s-gcrio.azureedge.net/
+ image: k8s-gcrio.azureedge.net/metrics-server-amd64:v0.2.1
My cluster was built a week ago.
same happens here after upgrading the cluster from 1.10.3 to 1.11.2.
Is there another option to fix this or should we just edit the deployment and use this image: image: k8s-gcrio.azureedge.net/metrics-server-amd64:v0.2.1
?
@jskulavik already 1.5 months since "We will be rolling out a fix shortly." Any news?
Hi @jalberto,
Yes, the fix rolled out for this weeks ago. If we are seeing this exact same error again, then please file an incident with Azure support for tracking.
Hi @jskulavik thanks for the info, still, this will automagically repair? or there are actions required from our side?
If this is Fix, close this Issue with a solution or actions to take please so next one knows what to do
New cluster creation, cluster version upgrades, or the manual patching referencing the image above on this threead will all remediate this issue. Thanks again @jalberto