Questions tagged with DevOps

Content language: English

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

Failed to pull and unpack image with status code [manifests v1.1]: 401 Unauthorized

Hi, I created an ec2 instance and installed microk8s. Now, I am trying to pull the image from ecr. I have attached IAM role to the ec2 instance with AmazonEC2ContainerRegistryReadOnly policy attached. I have also downloaded and configure iam-authenticator but still I am getting the following events ``` Normal Scheduled 32s default-scheduler Successfully assigned k8ssandra-operator/soap-deployment-5785fdcbb6-psvml to ip-192-168-81-119 Normal Pulling 18s (x2 over 32s) kubelet Pulling image "" Warning Failed 18s (x2 over 31s) kubelet Failed to pull image "": rpc error: code = Unknown desc = failed to pull and unpack image "": failed to resolve reference "": pulling from host failed with status code [manifests v1.1]: 401 Unauthorized Warning Failed 18s (x2 over 31s) kubelet Error: ErrImagePull Warning MissingClusterDNS 5s (x6 over 32s) kubelet pod: "soap-deployment-5785fdcbb6-psvml_k8ssandra-operator(5f1750ed-8316-48c0-869f-9fa4b0870d22)". kubelet does not have ClusterDNS IP configured and cannot create Pod using "ClusterFirst" policy. Falling back to "Default" policy. Normal BackOff 5s (x3 over 31s) kubelet Back-off pulling image "" Warning Failed 5s (x3 over 31s) kubelet Error: ImagePullBackOff ``` my .kube/config is as following ``` apiVersion: v1 clusters: - cluster: server: certificate-authority-data: my-ca name: kubernetes contexts: - context: cluster: kubernetes user: aws name: aws current-context: aws kind: Config preferences: {} users: - name: aws user: exec: apiVersion: command: /home/ubuntu/aws-iam-authenticator args: - "token" - "-i" - "aws-cluster-123456" - "-r" - "<role-arn>" ```
asked a month ago