alta3 / kubernetes-the-alta3-way

The greatest k8s installer on the planet!
223 stars 34 forks source link

12 default registry #13

Closed sgriffith3 closed 3 years ago

sgriffith3 commented 3 years ago

fixes #12

This PR implements the /etc/containerd/config.toml fix for the kubernetes labs so that the registry points to {{ docker_io_mirror_endpoint }}.

To Verify This PR

  1. Launch (or use existing) test cka or k8s environment
  2. In pane 1, watch the number of available image pulls from docker.io

    watch -d 'TOKEN=$(curl -s "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token) \
    && curl -s --head -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest'
  3. In pane 2, cd git/kubernetes-the-alta3-way
  4. git pull
  5. git checkout 12_default_registry
  6. ansible-playbook -i hosts.yml main.yml
  7. wget https://static.alta3.com/courses/cka/image_pull_test.yml
  8. kubectl apply -f image_pull_test.yml

You should observe that the rate limit in the bottom line of the watch output remains the same, even though you are making 6 calls to "docker.io"

seaneon commented 3 years ago

Looks like those steps worked. I started at 90, and then before I did anything it went down to 89 and then 88. Stayed there after I ran the playbook, wget, and deployment.