When the IBM Event Streams chart is deployed, an
Internal service error occurs stating that there are
no ImagePolicies in the "<name>" namespace, where
<name> is the namespace into which you are deploying the chart.
Image policies are used to control access to Docker repositories and it is necessary to ensure that there is a suitable policy in place before the chart is installed.
This situation occurs if there are no image policies defined for the target namespace. To confirm this, list the policies as follows:
kubectl get imagepolicy
You should see a message stating
No resources found.
Resolving the problem
If you are using IBM Event Streams (not the Community Edition), you will need access to the following image repositories:
If you are using Community Edition, you need access to the following image repositories:
Note: IBM Event Streams Community Edition is no longer available from 1 May 2020. For information about trying out Kafka and Event Streams for free, see the product pages.
To apply an image policy, create a new yaml file with the following content, replacing the namespace with the namespace into which the chart will be deployed and the name with a name of your choice.
Important: Always ensure you install Event Streams in a dedicated namespace. Do not use any of the default namespaces (
kube-public, and so on).
The following is an example where we are adding both repositories:
apiVersion: securityenforcement.admission.cloud.ibm.com/v1beta1 kind: ImagePolicy metadata: name: <imagePolicyName> namespace: <namespace> spec: repositories: - name: docker.io/* policy: null - name: mycluster.icp:8500/* policy: null
Then run the following command to create the image policy:
kubectl apply -f <yamlFile>
Finally, repeat the installation steps to deploy the chart.