Red Hat Openshift 4 provides two different ways to install its platform: Installer-provisioned infrastructure (IPI) and User-provisioned infrastructure (UPI). Between these two, IPI is a great option for a team with public access to the Internet, because it provides a quick installation that should not take more than 30 minutes with its automated wizard.
However, it's always possible that something could go wrong or you could accidentally lose information that you need. Some information can be very important, like the admin password or cluster URL. You may forget to write down the information or lose the file with the data. So how do you recover the lost password?
Lost kubeadmin password
For example, as seen in the screenshot below, after I ran the openshift-install create cluster --dir $HOME/cluster-xxx command and went through the installation wizard, my Terminal window somehow forgot to print out the kubeadmin password.
[ Getting started with Red Hat OpenShift Service on AWS Learning Path - Getting started with Red Hat OpenShift Service on AWS. ]
OpenShift installation log
Fortunately, there is a way to recover the information. To retrieve the password, however, the following two requirements must be satisfied:
- You have
sudoaccess to the OpenShift cluster. - The path containing the OpenShift cluster is fresh, so the necessary installation log still exists.
The file you are looking for is named .openshift_install.log and it is found in the OpenShift installation directory. It is a hidden file, as indicated with a . (dot) preceding the file name, so use the ls -la command to display it.
Here are the steps:
- SSH into the machine that hosts the OpenShift cluster.
- Type
sudo -ito switch to a privileged user. cdinto the directory that has the OpenShift installation.- Type
ls -lato see the hidden log file. - View the contents of
.openshift_install.logwithcator another text editor, such asvim.
For example, if you need the kubeadmin password, it should be in the .openshift_install.log file. If you want to log in with the default credential, the username is kubeadmin. The password is the one found in the log.
Wrap up
I hope this article helps you understand how to recover the kubeadmin password for an OpenShift 4 cluster. Thank you for reading, and see you next time.
[ Getting started with containers? Check out this free course - Deploying containerized applications: A technical overview. ]
저자 소개
Bryant Jimin Son is a Consultant at Red Hat, a technology company known for its Linux server and opensource contributions. At work, he is working on building the technology for clients leveraging the Red Hat technology stacks like BPM, PAM, Openshift, Ansible, and full stack development using Java, Spring Framework, AngularJS, Material design. Prior to joining Red Hat, Bryant was at Citi Group's Citi Cloud team, building the private Infrastructure as a Service (IaaS) cloud platform serving 8,000+ teams across Citi departments. He also worked at American Airlines, IBM, and Home Depot Austin Technology Center. Bryant graduated with Bachelor of Sciences in Computer Science and Aerospace Engineering with minor concentration in Business at University of Texas at Austin.
He is also the President and Founder of Korean American IT Association group, known as KAITA (www.kaita.org). He is an avid coder spending extra time on building side projects at cafes, and he travels every week on business. He also loves to work out daily and to grow KAITA.
유사한 검색 결과
Red Hat and Sylva unify the future for telco cloud
Bridging the gap: Secure virtual and container workloads with Red Hat OpenShift and Palo Alto Networks
Can Kubernetes Help People Find Love? | Compiler
Scaling For Complexity With Container Adoption | Code Comments
채널별 검색
오토메이션
기술, 팀, 인프라를 위한 IT 자동화 최신 동향
인공지능
고객이 어디서나 AI 워크로드를 실행할 수 있도록 지원하는 플랫폼 업데이트
오픈 하이브리드 클라우드
하이브리드 클라우드로 더욱 유연한 미래를 구축하는 방법을 알아보세요
보안
환경과 기술 전반에 걸쳐 리스크를 감소하는 방법에 대한 최신 정보
엣지 컴퓨팅
엣지에서의 운영을 단순화하는 플랫폼 업데이트
인프라
세계적으로 인정받은 기업용 Linux 플랫폼에 대한 최신 정보
애플리케이션
복잡한 애플리케이션에 대한 솔루션 더 보기
가상화
온프레미스와 클라우드 환경에서 워크로드를 유연하게 운영하기 위한 엔터프라이즈 가상화의 미래