1

I am having issues with my Kubernetes cluster daemonSet. I have deployed this yaml file on my cluster. It looks like the daemonSet is failing to pull the docker image from the registry.

apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: oci-la-fluentd-daemonset
  namespace: kube-system
  labels:
    app: oci-la-fluentd-logs
    version: v1
spec:
  selector:
    matchLabels:
      app: oci-la-fluentd-logs
      version: v1
  template:
    metadata:
      labels:
        app: oci-la-fluentd-logs
        version: v1
    spec:
      serviceAccountName: oci-la-fluentd-serviceaccount
      tolerations:
        - key: node-role.kubernetes.io/master
          effect: NoSchedule
      # Uncomment the following section if a secret is associated to pull the image
      imagePullSecrets:
      - name: regcred
      containers:
        - name: oci-la-fluentd-logs
          # Replace this value with actual docker image url
          image: iad.ocir.io/kobie/oke_logging/fluentd_oci_la
          # Replace this value with desired value for image pull policy
          imagePullPolicy: Always
          env:
            - name: awx_lower
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName

As you could see I have attached the secrets on my yaml files to pull the image.

This is the error message. This is what I get on the cluster when I look at the pods.

Failed to pull image iad.ocir.io/kobie/oke_logging/fluentd_oci_la:latest rpc error: code = Unknown desc denied: Anonymous users are only allowed read access on public repos
1

1 Answer 1

0

One way to fix this if that's allowed is by setting insecure-registries on the host's docker config:

sudo cat /etc/docker/daemon.json

{
    "insecure-registries" : [ "10.10.10.10:5000" ]
}

restart docker daemon after this

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.