Development Environment Setup
In a development environment, Kubernetes runs as a tool called
MiniKube and works in conjunction with a VM
provider(?). My choice is
kubectl, the Kubernetes CLI, check out the docs here. It's as simple as
brew install kubectl. You could also download it via curl. This also sticks the binary in
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl
- Use the curl command found in the docs. It will also move the binary to
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.18.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
Check if successful - run
minikube start to kick things off. There should be messages indicating progress + completion. There's also a simple hello world type exercise that can be done, take a look at the README for more information.
Much more detailed usage information can be found on the getting started page here.
Creating a Deployment - See here for more info.
Create a Deployment from an image, no
YAML file necessary :
$ kubectl run <name of deployment> --image=<image name>:<version tag> # verify with kubectl get pods
Or alternatively with a
Creating a Pod
YAML file is the format used to specify the characteristics of a Pod.
$ kubectl create -f <PATH TO YAML FILE>