Using GitHub Actions to deploy applications to IBM Cloud Kubernetes Service
In this post, hear from @stevemar, a Senior Technical Staff Member at IBM, about a new GitHub Starter Workflow for developers deploying containerized applications to IBM Cloud Kubernetes Service. Here…
![](https://github.blog/wp-content/uploads/2019/03/company-twitter.png?resize=1201%2C630)
In this post, hear from @stevemar, a Senior Technical Staff Member at IBM, about a new GitHub Starter Workflow for developers deploying containerized applications to IBM Cloud Kubernetes Service.
Here at IBM, we’re one of GitHub’s top users, with hundreds of orgs and thousands of commits per day. We’re such big fans that we wanted to share a new GitHub Starter Workflow we recently announced that will get you deploying your containerized applications to IBM Cloud Kubernetes Service faster. The IBM Cloud Kubernetes Service supports multizone clusters, managed cluster updates, and compliance certifications for regulated workloads (PCI, HIPAA, GDPR, SOC1, and SOC2 Type 2). With just a few clicks, you can leverage GitHub Actions to generate a workflow, which can be customized to your cluster and application needs.
GitHub Starter Workflow for IBM Cloud Kubernetes Service
Let’s take a look at how to use this new workflow. When you click the “Actions” tab of any GitHub repository, you’ll immediately see IBM Cloud Kubernetes Service as an option for you to deploy on.
When you select Deploy to IBM Cloud Kubernetes Service, a workflow is generated for you. By default, the workflow performs the following steps:
- Installs IBM Cloud CLI
- Authenticates with IBM Cloud CLI
- Builds the Docker image
- Pushes the image to IBM Cloud Container Registry
- Deploys the Docker image to a IBM Cloud Kubernetes Service cluster
Before committing the file, be sure to configure the IMAGE_NAME
, IKS_CLUSTER
, DEPLOYMENT_NAME
, and PORT
fields. Additionally, you’ll need to create two GitHub Secrets, one for your IBM Cloud API key and one for your IBM Cloud Container Registry namespace.
GITHUB_SHA: ${{ github.sha }}
IBM_CLOUD_API_KEY: ${{ secrets.IBM_CLOUD_API_KEY }}
IBM_CLOUD_REGION: us-south
ICR_NAMESPACE: ${{ secrets.ICR_NAMESPACE }}
REGISTRY_HOSTNAME: us.icr.io
IMAGE_NAME: iks-test
IKS_CLUSTER: example-iks-cluster-name-or-id
DEPLOYMENT_NAME: iks-test
PORT: 5001
When you’re ready to test it out, create a release and see the workflow in action! Here is a sample run:
For an in-depth look at how the workflow was written, check out “Use a GitHub Action to deploy an app to Kubernetes” on the IBM Developer blog. Interested in trying this out? Get started.
What’s next
We plan to create distinct actions for installation and authentication of the IBM Cloud CLI in the future. Doing so will better help other developers create IBM Cloud workflows.
If you have questions or concerns, please reach out to our team via Slack. Register and join the discussion in the #general channel. We hope to see you there!
Tags:
Written by
Related posts
![](https://github.blog/wp-content/uploads/2023/10/Collaboration-DarkMode-2.png?resize=400%2C212)
2024 is the biggest global election year in history. What’s at stake for developers?
GitHub is considering what is at stake for our users and platform, how we can take responsible action to support free and fair elections, and how developers contribute to resilient democratic processes.
![](https://github.blog/wp-content/uploads/2023/10/AI-DarkMode-2.png?resize=400%2C212)
GitHub named a Leader in the Gartner first-ever Magic Quadrant for AI Code Assistants
This year, as part of its annual Magic Quadrant series, Gartner published a first-of-its-kind report analyzing the state of play in the AI Code Assistants market–and named GitHub a Leader.
![AI in software development 2024 survey results with colorful graphics and percentages.](https://github.blog/wp-content/uploads/2024/08/ai-survey-header.png?resize=400%2C212)
Survey: The AI wave continues to grow on software development teams
We surveyed 2,000 people on software development teams at enterprises in the U.S., Brazil, India, and Germany about the use, experience, and expectations around generative AI tools in software development.