upgrade minikube at Debian GNU/Linux 10 (buster)
Minikube is an executable, in this case you would need to re-install
the minikube
with the desired version. There is no command to upgrade the running Minikube
.
You would need to:
sudo minikube delete # remove your minikube cluster
sudo rm -rf ~/.minikube # remove minikube
and reinstall it using Minikube documentation - Start, depends on what your requirements are (packaged used in docs should be always up to date and should cover all your requirements regarding available drivers).
update k8s in minikube
You can start minikube
with a k8s
version of your choice
▶ minikube start --kubernetes-version=1.22.1
minikube v1.23.0 on Darwin 11.6.1
✨ Using the virtualbox driver based on existing profile
Starting control plane node minikube in cluster minikube
minikube 1.25.1 is available! Download it: https://github.com/kubernetes/minikube/releases/tag/v1.25.1
To disable this notice, run: 'minikube config set WantUpdateNotification false'
Unable to update Minikube Deployment with new image
If you did pull the image outside the minikube cluster and you successfully run it as docker container .. then It should work(check if the IMAGE ID is unique, else if you didnt change anything in dockerfile then newly created image will have the same image ID ) If successfully created , tagged and uploaded like : dockerhub starax/service-frontend-voting:test
You can do these steps
eval $(minikube docker-env)
docker images
=> check the IMAGE IDs and name of images and their tagsdocker pull starax/service-frontend-voting:test
=> this will download
the test tagrun
docker images
again => to check if image ID , tags are different than the previous onrdAfter that in manifest file
kubectl edit deploy service-frontend-voting
changeimagePullPolicy: IfNotPresent
andimage: starax/service-frontend-voting:test
Notes the command 1. you used wont do anything, because deployment will recreate another pod even if you deleted that pod , the new pod will have the image that is indicated in deployment which is same the old version.kubectl describe service-frontend-voting
to check name and tag of the image that being used ..
The command 2,3 will delete, then create a same deployment as before, and the image pulled will be starax/service-frontend-voting:latest
To update image use => 4
About 6, if you don't specify the tag of an image K8s will pulled that image with tag latest tag.Also If you dont indicate imagePullPolicy then policy by default is Always ..
Also check kubectl get events
is good command to tell you if you pulled a new image or no
I hope I helped
how to use new release of kubernetes as default in minikube
You can set its default value with:
minikube config set kubernetes-version v1.7.0
It edits ~/.minikube/config/config.json
and adds:
{
"kubernetes-version": "v1.7.0"
}
Check out Selecting a Kubernetes version in the documentation. Check source code config.go for reference.
How to install a specific version of minikube on Mac OS?
Binary:
Go to the link below. Search for the version you want to install. Click on “Assets” of that version, Download the binary suitable for your macOS architecture. Install it.
sudo install minikube-darwin-amd64 /usr/local/bin/
https://github.com/kubernetes/minikube/releases
Homebrew:
Go to the link below. Search for your version. Click on “view at this point in history”. Click on “Raw” and copy the url.
brew install “raw-url-link”
brew unlink minikube
brew link minikube
https://github.com/Homebrew/homebrew-core/commits/eaad48a89767c4fb7e4d80fcfacf24035844d3d0/Formula/minikube.rb
How to update k8s pod to newer version of image after minikube image load
Managed to solve this myself.
I made a script that would first generate a random number and use it as the image's tag, it would then use kubectl set image
to update the image.
$tag = $(Get-Random)
echo "building image"
docker build --build-arg NPM_TOKEN=$(cat .token) -t "sso-service:$tag" .
echo "loading image"
minikube image load "sso-service:$tag" --daemon=true
kubectl set image deployment/sso sso="sso-service:$tag"
Related Topics
Bash: Loop Until Command Exit Status Equals 0
Installing Gcc from Source on Alpine
On-The-Fly Output Redirection, Seeing The File Redirection Output While The Program Is Still Running
How to Remove Special Characters in File Names
Gcloud - How to Automate Installation of Gcloud on a Server
Can't Register a Snapshot Repository in Elasticsearch
Runner Is Not Healthy and Will Be Disabled
How to Tell Binary from Text Files in Linux
Using Netcat to Pipe Unix Socket to Tcp Socket
How to Sleep 10 Seconds Before Running a Linux Command
Set Environment Variables in an Aws Instance
Bash Loop Through Directory Including Hidden File
Is Swarm Required for Using Multi-Host Networking Feature Using Overlay in Docker
Is There a Libc in Kernel Space
How to Do a While Loop with a String Redirected into It
Docker Container Can Reach Dns But Not Resolve Hosts
How to Copy The Top 10 Most Recent Files from One Directory to Another