Deploy Kube Workloads

Now that you have access to your Kubernetes cluster, you can deploy a simple workload and advertise that to the internet. This guide assumes that you’ve already followed the BGP configuration /operations/bgp: for your environment and can advertise a /32 single IP address to your peer (and to the internet).

As an example we’re going to deploy the Project Contour ingress controller and deploy a simple application on our cluster using manifests.

We’ll begin by taking the ProjectContour getting started manifest and remove a couple of lines to prevent the nested cluster from advertising hostPorts to the hardware cluster.

curl https://raw.githubusercontent.com/projectcontour/contour/release-1.23/examples/render/contour.yaml | grep -v hostPort > contour.yaml

Now, simply deploy the the manifest to your cluster.

kubectl --kubeconfig fluid-kube-ctl.yml apply -f contour.yaml

After some time, once all the contour pods and worloads have started, we’ll notice that a LoadBalancer has been created and can be seen from the Kubectl CLI or within the Fluid console:

NAMESPACE        NAME         TYPE           CLUSTER-IP       EXTERNAL-IP     PORT(S)                      AGE
projectcontour   contour      ClusterIP      100.66.160.174   <none>          8001/TCP                     1m
projectcontour   envoy        LoadBalancer   100.66.10.121    123.123.123.32  80:30178/TCP,443:32267/TCP   1m

Now we can deploy a workload that’ll use this ingress controller to access internet services. Here we’ll deploy the simple helloworld-esque example from httpbin, which will direct all http traffic to itself.

kubectl --kubeconfig fluid-kube-ctl.yml apply -f https://projectcontour.io/examples/httpbin.yaml

And just like that, you’ve deployed your first cluster and workload on Kube in Fluid!