-
Install a recent version of Docker for Mac/Windows and enable Kubernetes OR Minikube is installed and running.
-
Mini-kube users should configure following annotations in every sample with valid values:
@kubernetes:Deployment { dockerHost:"tcp://192.168.99.100:2376", dockerCertPath:"/Users/anuruddha/.minikube/certs" }
-
Docker for windows users should enable remote access to the API. (If DOCKER_HOST and DOCKER_CERT_PATH are exported as environment variables, priority will be given to environment variables.)
-
Heapster monitoring configured. (This is optional and required only if Horizontal Pod Autoscaler are used. If you are running on GCE, heapster monitoring will be turned-on by default.)
- Execute the below command to deploy nginx ingress controller.
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.27.0/deploy/static/mandatory.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.27.0/deploy/static/provider/cloud-generic.yaml
- Execute the below command to enable ssl pass-through.
kubectl patch deployments -n ingress-nginx nginx-ingress-controller -p '{"spec":{"template":{"spec":{"containers":[{"name":"nginx-ingress-controller","args":["\/nginx-ingress-controller","--configmap=$(POD_NAMESPACE)\/nginx-configuration","--tcp-services-configmap=$(POD_NAMESPACE)\/tcp-services","--udp-services-configmap=$(POD_NAMESPACE)\/udp-services","--publish-service=$(POD_NAMESPACE)\/ingress-nginx","--annotations-prefix=nginx.ingress.kubernetes.io","--annotations-prefix=nginx.ingress.kubernetes.io","--enable-ssl-passthrough"]}]}}}}'
minikube addons enable ingress
- Verify nginx is up and running. (Namespace can be different based on you installation)
$> kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
nginx-ingress default-http-backend-69c767b879-l6pwj 1/1 Running 0 3d
nginx-ingress nginx-5667df56c8-8d8ct 1/1 Running 0 3d
- Sample1: Kubernetes Hello World
- Sample2: Kubernetes Hello World with livenessProbe and hostname mapping
- Sample3: Ballerina program with multiple services running in multiple ports
- Sample4: Kubernetes Hello World Secured
- Sample5: Ballerina service with http and https endpoint
- Sample6: Kubernetes Hello World in Google Cloud Environment
- Sample7: Mount secret volumes to deployment
- Sample8: Mount config map volumes to deployment
- Sample9: Mount PersistentVolumeClaim to deployment
- Sample10: Ballerina module with kubernetes annotations
- Sample11: Kubernetes Hello World with Ballerina Function
- Sample12: Copy External files to Docker Image
- Sample13: Ballerina modules with dependencies
- Sample14: Deploy Ballerina service in a namespace
- Sample15: Resource quotas for namespaces
- Sample16: Istio Gateway and Virtual Service generation (Remove nginx setting up)
- Sample17: OpenShift Build Configs and Routes (Remove nginx setting up)