DZone
Cloud Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Cloud Zone > Deploying Apps to Kubernetes on the IBM Cloud With Helm

Deploying Apps to Kubernetes on the IBM Cloud With Helm

This quick guide will teach you how to use the package manager Helm to deploy apps to Kubernetes on IBM's Cloud Container Service.

Niklas Heidloff user avatar by
Niklas Heidloff
CORE ·
Oct. 30, 17 · Cloud Zone · Tutorial
Like (1)
Save
Tweet
4.89K Views

Join the DZone community and get the full member experience.

Join For Free

helm is the package manager for kubernetes. with helm, you can very easily deploy applications, tools, and databases like mongodb, postgresql, wordpress, and apache spark into your own kubernetes clusters. below is a brief description of how to use helm for the ibm cloud container service.

“helm helps you manage kubernetes applications. helm charts helps you define, install, and upgrade even the most complex kubernetes application. charts are easy to create, version, share, and publish, so start using helm and stop the copy-and-paste madness. the latest version of helm is maintained by the cncf .”

you can easily install applications by invoking commands like ‘helm install stable/mongodb’. you can also configure applications before installing them via yaml configuration files.

the kubernetes community provides a curated catalog of stable helm charts . additionally, ibm provides charts for db2, mq, and more.

below is a quick example for how to deploy mongodb to kubernetes on the ibm cloud.

first, you need to configure the bluemix cli to work against your kubernetes cluster, and you need to install helm on your development machine.

bx login -a https://api.ng.bluemix.net
bx target --cf
bx cs init
bx cs cluster-config mycluster
set environment variable: export kubeconfig=...
bx cr login
helm init
helm repo add stable https://kubernetes-charts.storage.googleapis.com/


next, you can install kubernetes applications with the following command:

helm install --name my-tag stable/mongodb


if you want to delete everything later, run ‘helm delete my-tag’.

to find out the ip address and port, run these commands:

bx cs workers mycluster
kubectl get svc
kubectl get svc my-service


if you have a paid account, this is all you have to do.

the free account does not support persistent volumes . as a workaround (not for production) you can use disk space on worker nodes. run ‘kubectl create -f config.yaml’ with the following content in config.yaml for mongodb.

kind: persistentvolume
apiversion: v1
metadata:
  name: mongo-simple-mongodb
  namespace: default  
spec:  
  capacity:
    storage: 10gi
  accessmodes:
    - readwriteonce
  hostpath:
    path: "/tmp/data"


after this, you can see everything working on the kubernetes dashboard (‘kubectl proxy’).

helm-mongo


Kubernetes IBM Cloud Cloud application app

Published at DZone with permission of Niklas Heidloff, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Waterfall Vs. Agile Methodologies: Which Is Best For Project Management?
  • How to Utilize Python Machine Learning Models
  • 4 Different Ways to Work With Nebula Graph in Apache Spark
  • Kafka Fail-Over Using Quarkus Reactive Messaging

Comments

Cloud Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo