Comments (3)
After a bit of digging I found we can use a really crude workaround. If we set the username name to the same format that oc login uses we can set the current-context back to minishift
during gofabric8 start
after we've logged in. oc login -u admin -p admin
updates the minikube username config with the token which means we can reuse the minishift context.
This is not a good approach though as minishift would still use the incorrect context if run without fabric8.
Is there anyone from the openshift team working on minishift that can help advise if there's a way to keep the current minishift
context when logging in?
from minishift.
FWIW this was the idea that I had to reuse the username format that oc login
uses rawlingsj@d2c89e5
from minishift.
@rawlingsj I am not able to reproduce this issue with latest minishift release
$ minishift version
Minishift version: 1.0.0-beta.2
$ minishift start --vm-driver virtualbox
Starting local OpenShift cluster using 'virtualbox' hypervisor...
Downloading ISO
Provisioning OpenShift via '/home/budhram/.minishift/cache/oc/v1.3.1/oc [cluster up --use-existing-config --host-config-dir /var/lib/minishift/openshift.local.config --host-data-dir /var/lib/minishift/hostdata]'
-- Checking OpenShift client ... OK
-- Checking Docker client ... OK
-- Checking Docker version ... OK
-- Checking for existing OpenShift container ... OK
-- Checking for openshift/origin:v1.3.1 image ...
Pulling image openshift/origin:v1.3.1
Pulled 0/3 layers, 3% complete
Pulled 0/3 layers, 27% complete
Pulled 0/3 layers, 49% complete
Pulled 1/3 layers, 64% complete
Pulled 1/3 layers, 83% complete
Pulled 2/3 layers, 87% complete
Pulled 3/3 layers, 100% complete
Extracting
Image pull complete
-- Checking Docker daemon configuration ... OK
-- Checking for available ports ... OK
-- Checking type of volume mount ...
Using Docker shared volumes for OpenShift volumes
-- Creating host directories ... OK
-- Finding server IP ...
Using 192.168.99.100 as the server IP
-- Starting OpenShift container ...
Creating initial OpenShift configuration
Starting OpenShift using container 'origin'
Waiting for API server to start listening
OpenShift server started
-- Installing registry ... OK
-- Installing router ... OK
-- Importing image streams ... OK
-- Importing templates ... OK
-- Login to server ... OK
-- Creating initial project "myproject" ... OK
-- Server Information ...
OpenShift server started.
The server is accessible via web console at:
https://192.168.99.100:8443
You are logged in as:
User: developer
Password: developer
To login as administrator:
oc login -u system:admin
$ kubectl config current-context
myproject/192-168-99-100:8443/developer
$ export PATH=$PATH:~/.minishift/cache/oc/v1.3.1
$ oc login -u system:admin
Logged into "https://192.168.99.100:8443" as "system:admin" using existing credentials.
You have access to the following projects and can switch between them with 'oc project <projectname>':
default
kube-system
* myproject
openshift
openshift-infra
Using project "myproject".
$ kubectl config current-context
myproject/192-168-99-100:8443/system:admin
I am closing this issue at the moment but feel free to reopen it if you still experiencing it.
from minishift.
Related Issues (20)
- Not able to populate hyperv-virtual-switch flag with External VM Switch value
- Minishift not starting on Windows 10 VirtualBox HOT 4
- Minishift not starting on Rocky Linux 8.5 HOT 1
- This computer doesn't have VT-X/AMD-v enabled HOT 1
- OC commands on Monterey macOS give "fatal error: runtime: bsdthread_register error" HOT 1
- Minishift doesn't work on MacOS Monterey, need new direction if no longer maintained. HOT 2
- Could not set oc CLI context for 'minishift' profile
- please make all installation steps in one Dockerfile & run on port 3000 at the end
- Cannot get OpenShift release version v3.11.0: HOT 1
- Error ".. FAIL E1216 18:22:49.047095 3027 start.go:499] Error starting the VM: Error creating the VM." Docker certificate issue?
- Flag 'http-proxy' is not supported for oc version v3.11.0. Use 'openshift-version' flag to select a different version of OpenShift. FAIL
- > have you tried clearing the cache? and how about deploying a previous version of OpenShift to compare the results? HOT 3
- I installed minishift on my mac, While connected to vpn i am not able to access minishift console but after disconnect, console is accessible, kindly suggest How to access console with vpn as well.
- Github readme contains broken link for Getting Start with Minishift HOT 1
- Unable to connect to web console
- Cannot pull origin-control-plane when starting minishift
- Problem with starting minishift on Windows 10 machine (i5-10600KF cpu) HOT 1
- Starting Minishift FAIL, Error: timed out waiting for the condition HOT 2
- Documentation section in the readme has broken links
- migrate to Go modules HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minishift.