105 Appendix B Running Keycloak using a Helm chart

Antonio · Intermediate ·☁️ DevOps & Cloud ·1y ago

About this lesson

Watch 105 Appendix B Running Keycloak using a Helm chart by Antonio. This content is being analysed by DeepCamp AI to generate a detailed summary.

Full Transcript

section b. five running keycloak using a Helm chart as with rabbit mq digital ocean doesn't provide a managed keycloak service the keycloak project is working on an operator but it's still in beta at the time of writing so we'll deploy it using a different approach Helm charts think of Helm as a package manager to install software on your computer you would use one of the operating system package managers like apt Ubuntu Homebrew Mac OS or chocy Windows in kubernetes you can similarly use Helm but they're called charts instead of packages go ahead and install Helm on your computer you can find the instructions on the official website helm. sh if you are on Mac OS or Linux you can install Helm with Homebrew see this code I have already configured all the necessary resources to use the keycloak helm chart provided by bitnami bitnami dcom and I've prepared a script to deploy it open a terminal window go to your polar deployment project polar deployment and navigate to the kubernetes platform production keycloak folder you should have copied that folder over to your repository when configuring the kubernetes cluster if that's not the case please do so now from the source code repository accompanying this book chapter 15/15 / poolar deployment platform production keycloak then run the following command to deploy keycloak to your production kubernetes cluster see this code feel free to open the file and look at the instructions before running it note you might need to make the script executable first with the command schmod plusx deploy.sh the script will output details about all the operations performed to deploy keycloak and print the admin username and password you can use to access the keycloak admin console feel free to change the password after your first login note the credentials down since you might need them later the deployment can take several minutes to complete so it's a good time to take a break and drink a beverage of your choice as a reward for everything you have accomplished so far good job finally the script will create a polar keycloak client credential secret with the client secret that edge service will need to authenticate with keycloak you can verify that the secret has been successfully created as follows the value is generated randomly by the script see this code note the keycloak helm chart spins up a postgressql instance inside the cluster and uses it to persist the data used by keycloak we could have integrated it with the postgressql service managed by digital ocean but the configuration on the keycloak side would have been quite complicated if you'd like to use an external postgress ql database you can refer to the keycloak helm chart documentation see this link the keycloak server is deployed in a dedicated keycloak system namespace applications can interact with it at polar keycloak do keycloak system. svc.com Port 8,080 from within the cluster it's also exposed outside the cluster via a public IP address you can find the external IP address with the following command see this code the platform might take a few minutes to provision a load balancer during the provisioning the external IP column will show a pending status wa wait and try again until an IP address is shown note it down since we're going to use it in multiple scenarios since keycloak is exposed via a public load balancer you can use the external IP address to access the admin console open a browser window navigate to external ip/ admin and log in with the credentials returned by the previous deployment script now that you have a public DNS name for keycloak you can define a couple of secrets to configure the keycloak integration in Edge service o two client catalog service and Order service ooth two resource servers open a terminal window navigate to the kubernetes platform production keycloak folder in your polar deployment project and run the following command to create the secrets that the applications will use to integrate with keycloak feel free to open the file and look at the instructions before running it remember to replace external IP with the external IP address assigned to your keycloak server see this code that's it for keycloak the following section will show you how to deploy polar UI to the production cluster
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Related Reads

📰
AWS Self-Healing Infrastructure: Catching and Fixing Server Crashes with AI Autopilot
Learn how to use AWS Self-Healing Infrastructure with AI Autopilot to catch and fix server crashes automatically
Medium · DevOps
📰
Understanding a Real AWS CodePipeline CI/CD Flow: Source Build Deploy"
Learn how to set up a CI/CD pipeline using AWS CodePipeline, covering source, build, and deploy stages
Dev.to · Guna SantoshDeep Srivastava
📰
How to Use Terraform with Python for Infrastructure
Learn to manage infrastructure with Terraform and Python for efficient and automated deployment
Dev.to · qing
📰
Interactive containers and exec: get inside, run commands, get out
Learn to interact with Docker containers using exec, cp, and shells to run commands and manage files
Dev.to · Javi Palacios
Up next
AWS, Azure, GCP: The One Thing Every Business Gets Wrong
AI Daily
Watch →