Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Vagrant provisioning via the shells scripts don't work because of legacy apt repository #1

Merged
merged 2 commits into from
Dec 27, 2023

Conversation

movd
Copy link
Contributor

@movd movd commented Dec 27, 2023

Thanks for providing the sample environments!

The vagrant provisioning via the shells scripts didn't work anymore because the legacy repository was used.

The same patch versions as before aren't available on the new official project-owned repositories. Because of this, I upgraded to the next available patch level above the ones used before. There is a dedicated package repository for each Kubernetes minor version. That's why I extracted the first four characters as a quick fix.

After switching to the new apt repository, I ran into kubernetes/release#3276. I copied the sed fix from kubernetes/release#3279

I hope you have a great start to the new year! Thanks for your books!!

KUBELET_EXTRA_ARGS not sourced resulted in:

```
Error from server (NotFound): the server could not find the requested resource ( pods/log somepod)
```
@movd
Copy link
Contributor Author

movd commented Dec 27, 2023

My tests:

✅ Creates the 1.26 repository URLs used in most of the sample exercises:

$ vagrant ssh kube-control-plane
...
vagrant@kube-control-plane:~$ kubectl get nodes
NAME                 STATUS   ROLES           AGE     VERSION
kube-control-plane   Ready    control-plane   3m54s   v1.26.1
kube-worker-1        Ready    <none>          37s     v1.26.1
vagrant@kube-control-plane:~$ cat /etc/apt/sources.list.d/kubernetes.list 
deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.26/deb/ /

✅ Creates the 1.25 repository URLs needed for chapter 3 sample exercise 7:

$ vagrant ssh kube-control-plane
...
vagrant@kube-control-plane:~$ k get nodes
NAME                 STATUS   ROLES           AGE     VERSION
kube-control-plane   Ready    control-plane   3m31s   v1.25.6
kube-worker-1        Ready    <none>          50s     v1.25.6
vagrant@kube-control-plane:~$ cat /etc/apt/sources.list.d/kubernetes.list 
deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.25/deb/ /
$ vagrant ssh kube-worker-1
...
vagrant@kube-worker-1:~$ cat /etc/apt/sources.list.d/kubernetes.list
deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.25/deb/ /

✅ Fetching Logs for pods works

@bmuschko
Copy link
Owner

Thanks a lot for this fix! Merged. Happy New Year.

@bmuschko bmuschko merged commit 861b372 into bmuschko:master Dec 27, 2023
1 check passed
@bmuschko bmuschko added the bug Something isn't working label Dec 27, 2023
@bmuschko bmuschko self-assigned this Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants