Search This Blog

Wednesday 18 December 2019

Spring Boot JPA project riff function demo

riff is an Open Source platform for building and running Functions, Applications, and Containers on Kubernetes. For more information visit the project riff home page https://projectriff.io/

riff supports running containers using Knative serving which in turn provides support for
  •     0-N autoscaling
  •     Revisions
  •     HTTP routing using Istio ingress
Want to try an example? If so head over to the following GitHub project which will show to do this step by step for Spring Data JPA function running using riff on a GKE cluster when required

https://github.com/papicella/SpringDataJPAFunction


More Information

1. Project riff home page
https://projectriff.io/

2. Getting started with riff
https://projectriff.io/docs/v0.5/getting-started

Wednesday 4 December 2019

k8s info: VMware Tanzu Octant - A web-based, highly extensible platform for developers to better understand the complexity of Kubernetes clusters

Octant is a tool for developers to understand how applications run on a Kubernetes cluster. It aims to be part of the developer's toolkit for gaining insight and approaching complexity found in Kubernetes. Octant offers a combination of introspective tooling, cluster navigation, and object management along with a plugin system to further extend its capabilities

So how would I install this?

1. First on my k8s cluster lets create a deployment and a service. You can skip this step if you already have workloads on your cluster. These commands will work on any cluster as the image exists on DockerHub itself so as long as you can get to DockerHub these kubectl commands will work.

$ kubectl run pbs-demo --image=pasapples/pbs-demo-image --replicas=2 --port=8080
$ kubectl expose deploy pbs-demo --type=LoadBalancer --port=80 --target-port=8080
$ http http://101.195.48.144/customers/1

HTTP/1.1 200
Content-Type: application/hal+json;charset=UTF-8
Date: Tue, 03 Dec 2019 16:11:54 GMT
Transfer-Encoding: chunked

{
    "_links": {
        "customer": {
            "href": "http://101.195.48.144/customers/1"
        },
        "self": {
            "href": "http://101.195.48.144/customers/1"
        }
    },
    "name": "pas",
    "status": "active"
}

2. To install Octant you can view instructions on the GitHub page as follows

https://github.com/vmware-tanzu/octant

Given I am on a Mac it's installed using brew as shown below. For other OS refer to link above

$ brew install octant

3. Thats it you can now launch the UI as shown below.

$  octant

2019-12-03T21:47:56.271+0530 INFO module/manager.go:79 registering action {"component": "module-manager", "actionPath": "deployment/configuration", "module-name": "overview"}
2019-12-03T21:47:56.271+0530 INFO module/manager.go:79 registering action {"component": "module-manager", "actionPath": "overview/containerEditor", "module-name": "overview"}
2019-12-03T21:47:56.271+0530 INFO module/manager.go:79 registering action {"component": "module-manager", "actionPath": "overview/serviceEditor", "module-name": "overview"}
2019-12-03T21:47:56.271+0530 INFO module/manager.go:79 registering action {"component": "module-manager", "actionPath": "octant/deleteObject", "module-name": "configuration"}
2019-12-03T21:47:56.272+0530 INFO dash/dash.go:370 Using embedded Octant frontend
2019-12-03T21:47:56.277+0530 INFO dash/dash.go:349 Dashboard is available at http://127.0.0.1:7777

Octant should immediately launch your default web browser on 127.0.0.1:7777

And to view our deployed application!!!!







It's a nice UI and it even has the ability to switch to a different k8s context from the menu bar itself



More Information

1. Seeing is Believing: Octant Reveals the Objects Running in Kubernetes Clusters
https://blogs.vmware.com/cloudnative/2019/08/12/octant-reveals-objects-running-in-kubernetes-clusters/

2. GitHub project page
https://github.com/vmware-tanzu/octant

Tuesday 3 December 2019

k8s info: kubectx and kubens to the rescue

kubectx is a utility to manage and switch between kubectl(1) contexts. To me this is so handy I can't live without it. I am constantly using k8s everywhere from PKS (Pivotal Container Service) clusters, GKE clusters, minikube and wherever I can get my hands on a cluster.

So when I heard about kubectx and no I can't live with this and it makes my life so much easier. His how

Where is my current k8s context and potentially what other contexts could I switch to?


Ok so I am in the k8s cluster with the context of "apples". Let's switch to "lemons" then


It's really as simple as that. In my world every k8s cluster is named after a FRUIT.

Finally if you wish to set the correct context namespace you can use "kubens" to do that just as easily as shown below



More Information

https://github.com/ahmetb/kubectx

https://formulae.brew.sh/formula/kubectx

Joined the ranks of the 100+ CKA/CKAD certified Pivotal Platform Architects

I am now officially CKAD certified in fact I am Cloud Foundry certified as well. Great to be certified with the leaders in container technology both with PaaS and CaaS.