Failed pod/test-pod Failed to pull image "ngi": rpc error: code = Unknown desc = failed to pull and unpack image "docker.io/library/ngi:latest": failed to resolve reference "docker.io/library/ngi:latest": pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
Step 1: Create two new Amazon Elastic Load Balancers (ELBs). Each ELB will host a single domain name. For example, `elb1` and `elb2`.
```bash
$ aws elbv2 create \
--load-balancer-arn $(aws ec2 get-load-balancer --region us-west-2 | jq -r '.LoadBalancerArn' | base64)"\
--name elb1"
```
And then repeat the command twice again to create `elb2`:
```bash
$ aws elbv2 create \
--load-balancer-arn $(aws ec2 get-load-balancer --region us-west-2 | jq -r '.LoadBalancerArn' | base64)"\
--name elb2"
```
After creating both ELBs, make sure they're running at least once before attempting to configure them further.
Step 2: Configure each ELB to listen on specific ports. This ensures that requests from clients connect to the correct instance behind the load balancer. In our case, we'll assume there are no other instances listening on 8080 and 8443, so we'll leave those ports empty. We'll specify port 80 for HTTP and 443 for HTTPS.
```sql
$ aws elbv2 register-target \
--listener '{"Listener":{"Protocol":"HTTP","Port":80,"InstanceProtocol":"http"},'elb1','0x12345678901234567890abcdef',true}'
$ aws elbv2 register-target \
--listener '{"Listener":{"Protocol":"HTTPS","Port":443,"InstanceProtocol":"https"},'elb1','0x12345678901234567890abcdef',true}'
$ aws elbv2 register-target \
--listener '{"Listener":{"Protocol":"HTTP","Port":80,"InstanceProtocol":"http"},'elb2','0x9876543211234657890abcdef',false}'
$ aws elbv2 register-target \
--listener '{"Listener":{"Protocol":"HTTPS","Port":8443,"InstanceProtocol":"https"},'elb2','0x9876543211234657890abcdef',false}'
```
Note that these commands should be run separately for each ELB. After registering all targets, verify that each target has been properly registered by checking their ARNs in the AWS Management Console.
Step 3: Assign a unique SSL certificate to each ELB. If you don't want to purchase a third party SSL certificate, you can generate self-signed certificates yourself using OpenSSL. These certificates will allow you to secure your domains without paying for commercial SSL certificates. However, keep in mind that self-signed certificates might result in slower connection times compared to paid SSL certificates due to increased latency caused by encryption overhead.
To generate a self-signed SSL certificate, follow these steps:
* Generate a private key file: `openssl genkey -out mydomain.key 2048 > /dev/null`
* Export the public key into PEM format: `openssl x509 -publish -in mydomain.crt > /dev/null`
* Copy the exported public key to the desired location within the Docker container.
Once you've generated the necessary files, update the configuration settings of each ELB to include the appropriate SSL certificate(s), IP address ranges, subnets, security groups, and routes. Make note of the relevant details when configuring each ELB.
Finally, test the setup thoroughly across all nodes involved in the cluster to ensure everything works correctly.