Minikube & Ozone

Requirements

  • Working minikube setup
  • kubectl

kubernetes/examples folder of the ozone distribution contains kubernetes deployment resource files for multiple use cases. By default the kubernetes resource files are configured to use apache/ozone image from the dockerhub.

To deploy it to minikube use the minikube configuration set:

  1. cd kubernetes/examples/minikube
  2. kubectl apply -f .

And you can check the results with

  1. kubectl get pod

Note: the kubernetes/examples/minikube resource set is optimized for minikube usage:

  • You can have multiple datanodes even if you have only one host (in a real production cluster usually you need one datanode per physical host)
  • The services are published with node port

Access the services

Now you can access any of the services. For each web endpoint an additional NodeType service is defined in the minikube k8s resource set. NodeType services are available via a generated port of any of the host nodes:

  1. kubectl get svc
  2. NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
  3. datanode ClusterIP None <none> <none> 27s
  4. kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 118m
  5. om ClusterIP None <none> 9874/TCP 27s
  6. om-public NodePort 10.108.48.148 <none> 9874:32649/TCP 27s
  7. s3g ClusterIP None <none> 9878/TCP 27s
  8. s3g-public NodePort 10.97.133.137 <none> 9878:31880/TCP 27s
  9. scm ClusterIP None <none> 9876/TCP 27s
  10. scm-public NodePort 10.105.231.28 <none> 9876:32171/TCP 27s

Minikube contains a convenience command to access any of the NodePort services:

  1. minikube service s3g-public
  2. Opening kubernetes service default/s3g-public in default browser...

Next >>