EKS cluster configurations
Procedure
- Set the access key and secret key credentials for your AWS
account:
sudo vi~/.aws/credentials
[default] aws_access_key_id= aws_secret_access_key= aws_session_token=
For more information, see https://docs.aws.amazon.com/cli/v1/userguide/cli-authentication-user.html#cli-authentication-user-get.
- Get the cluster information.
aws sts get-caller-identity
Example output:{ "UserId": "ABCDEFG", "Account": "123455667890", "Arn": "arn:aws:iam::123455667890:user/Reza-tmp" }
- Set the environment for your cluster:
export cluster_name="gi-eks" # replace with your EKS cluster name export region="us-east-2" # replace with region where you have created your cluster aws eks update-kubeconfig --region ${region} --name ${cluster_name}
- Create a namespace:
export NAMESPACE=openshift-marketplace # We recommend using this namespace. If you choose a different namespace, please refer to the following note. kubectl create ns $NAMESPACE
Important: It is recommended that you use theopenshift-marketplace
namespace, as both Redis and Db2 operators are designed to automatically install in that namespace. - Set the namespace:
kubectl config set-context --current --namespace=$NAMESPACE
- Install the OLM:
operator-sdk olm install
After installation, confirm that the OLM is successfully installed and the version is 0.27.0 or later.
kubectl get csv -n olm | grep packageserver packageserver Package Server 0.27.0 Succeeded
(Troubleshooting information is available in this bug report.)
- Make sure that OLM is configured to use
openshift-marketplace
as the default catalog namespace:- Create a namespace named
openshift-marketplace
:kubectl create ns openshift-marketplace
- Set the OLM namespace to use
openshift-marketplace
:oc set env deploy/catalog-operator GLOBAL_CATALOG_NAMESPACE=openshift-marketplace -n olm
- Change the global namespace for the
packageserver
by running this command:oc patch csv packageserver -n olm --type='json' -p='[ { "op": "replace", "path": "/spec/install/spec/deployments/0/spec/template/spec/containers/0/command/5", "value": "openshift-marketplace" } ]
- Verify the patch by checking the deployment. This must show that the
--global-namespace
is now set toopenshift-marketplace
. If OLM does not revert the change, it must persist.oc get deploy packageserver -n olm -o yaml | grep -A 5 "command:"
For troubleshooting, see https://github.com/operator-framework/operator-sdk/issues/4293.
- Create a namespace named