On September 16th, Oracle sent out a notification about a change that needs action before November 15th 2019: you need to upgrade your kubeconfig file from version 1.0.0 to version 2.0.0
Unfortunately, the links in the mail don't describe how to upgrade it, just how to download it....
So here is a short blog that describes what I did on my machine to upgrade my kubecofig file.
The response should be:
If you get the error "Not enough data to create auth info structure." , follow these steps:
Now you are all set!
Unfortunately, the links in the mail don't describe how to upgrade it, just how to download it....
So here is a short blog that describes what I did on my machine to upgrade my kubecofig file.
Update the config file
- open a command window
- type oci -v
- If the version is 2.6.4 or higher, you are fine. Otherwise type: pip install oci-cli --upgrade Take a look at this page if you encounter issues: Upgrading the CLI
- type oci ce cluster create-kubeconfig --cluster-id [your cluster ocid] --file $HOME/.kube/config --region [your region] --token-version 2.0.0
The response should be:
Existing Kubeconfig file found at C:\Users\ldikmans/.kube/config and new config merged into it
Test the new config
Please make sure you test your configuration by starting your proxy and open a browser that points to it:- Open a command window
- Type kubectl proxy
- Open a browsser window
- Add the URL: http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/login
- Select your updated kubeconfig file
Fix problems
If you get the error "Not enough data to create auth info structure." , follow these steps:
- open a command prompt
- type kubectl get secrets -n kube-system
- type kubectl describe secret -n kube-system kubernetes-dashboard-token-jjtzg (or whatever your dashboard service account user has as a token)
- copy the resulting token
- open the browser
- Add the URL: http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/login
- Select "Token"
- Paste the token you copied in step 4 in the field for token
When the dashboard opens properly, store the token in a file so you can copy it in the next time.
Happy coding 😀
ps: I would have been nice if this instruction was in the mail Oracle sent. Unfortunately it points to a link that contains the regular installation that does not explain it will merge it automatically. The good news is it was easier than it looked!
ps2: I think you should be able to store the token in the config file as well. However, so far I did not manage to make this work in my environment.
ps: I would have been nice if this instruction was in the mail Oracle sent. Unfortunately it points to a link that contains the regular installation that does not explain it will merge it automatically. The good news is it was easier than it looked!
ps2: I think you should be able to store the token in the config file as well. However, so far I did not manage to make this work in my environment.
No comments:
Post a Comment