Product Page | Knative | Kubernetes
This workshop will get a short and quick introduction to serverless programmin using PFS. PFS is based on knative.
- K8s is Kubernetes
- Knative is Kubernetes based serverless framework
- Istio is a service mesh framework. It was initially designed for Kubernetes, but it can be used on other container platforms, example Cloud Foundry / Pivotal Application Service
- Knative uses Istio to manage routing
- PFS is based on Knative. It adds:
- Builds via Cloud Native Buildpack
- Spring Invoker
- Github account
- Linux environment
- (Optional) Codeanywhere Account
- (Optional) Google Cloud Platform Account
You will need following tools to complete exercises in this workshop:
- Linux or Mac environment (required)
- git
- kubectl
- pfs
- curl
- Text Editor / IDE
If you do not have a linux/mac based machine, you can use one of the cloud based workspace.
Google Cloud provides a very good browser based shell. It is free to use. You will need a Google account to access cloudshell. Just go to Google Cloud Console - Cloudshell and follow the instructions to start cloud shell.
Ones you are in the shell, follow instruction in the Linux based host section of this page to finish setup.
CodeAnywhere provides an excellent web based IDE with terminal. This should sufficient for our usage. Just go through the signup process. You will need to verify you email in order to start using the workspace.
- Signup using you email, github or any other social account
- Verify you email
- Create a workspace and call it pfs
- Run the setup commands in the Linux based host section to finish setting
-
Setup kubectl (skip for GCP cloudshell)
curl -sLO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl chmod a+x kubectl sudo mv kubectl /usr/local/bin kubectl completion bash | sudo tee /etc/bash_completion.d/kubectl > /dev/null
OR on Mac
curl -sLO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl chmod a+x kubectl sudo mv kubectl /usr/local/bin
-
Setup pfs
curl -sLO https://github.com/yogendra/pfs-workshop/raw/master/setup-environment/bin/pfs.linux chmod a+x pfs.linux sudo mv pfs.linux /usr/local/bin/pfs pfs completion bash | sudo tee /etc/bash_completion.d/pfs > /dev/null
OR on Mac
curl -sLO https://github.com/yogendra/pfs-workshop/raw/master/setup-environment/bin/pfs.darwin chmod a+x pfs.darwin sudo mv pfs.linux /usr/local/bin/pfs
-
Fetch Kuberentes config for workshop.
# Change this to you own user id given by the instructor export WS_USER=CHANGE_ME
Following lines can be copy pasted
mkdir -p $HOME/.kube [[ -e $HOME/.kube/config ]] && cp $HOME/.kube/config $HOME/.kube/config.original curl -sL https://github.com/yogendra/pfs-workshop/raw/master/setup-environment/users/$WS_USER/config -o $HOME/.kube/config
TIP: Use Cheatsheet for setting up your shell now or later at any point
To check that you environment is configured properly, you may run following commands.
> kubectl cluster-info
Kubernetes master is running at https://pfs-workshop-k8s.atwater.cf-app.com:8443
CoreDNS is running at https://pfs-workshop-k8s.atwater.cf-app.com:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
> pfs service list