Talk about 'Things that are going to be outdated in about five minutes,".
So, while I did install Minikube onto my Mac, it brought my machine nearly to a crawl. Sticking with the in-house module for now.
Full disclaimer; I did this when I was very tired so the images may not line up in the right spots.
The cluster is running, so let’s deploy the containerized applications.
I’ll make a Deployment configuration, which tells Kubernetes how to create and update app instances.
It’ll schedule Instances onto individual nodes in our cluster to be monitored by the Deployment Controller.
If something goes down, or is deleted, the DC replaces it quickly and without much concern, much like replacing a minimum wage worker.
Kubectl is the CLI for Kubernetes, once again using the API to talk with the cluster.
When making a deployment, you need to specify the container image and number of replicas to run.
Put your applications into one of the supported container formats (?) to be deployed on the system.
kubectl commands have their own format;
kubectl [action][resource]
on the resource - node, container.
I use kubectl version again and see clearly now that Client and Server versions are installed.
The get nodes command also shows the same information as last time - minikube is ready.
Before deploying the app, let’s make sure it runs. We need to provide the
- Deployment name (I think it’s just kubernetes-bootcamp here)
- App image location (respository url for things outside of Docker hub)
- Which app to run the port on.
The command is;
kubectl run kubernetes-bootcamp —image=gcr.io/google-samples/kubernetes-bootcamp:v1 —port8080
Nice.
How many times is it running?
It’s running inside a container on our node, in a private, isolated network. kubectl is interacting through an API endpoint.
It can also create a proxy to forward communications into the clusterwide privage network, and stopped by ctrl+c.
A connection between terminal and cluster.
The API will automatically make an endpoint for each pod based upon the name that we can see through the proxy.
But what is the pod name?
(It’s stored in POD_NAME variable)
Let’s make the http request to the app in the pod;
Comments
Post a Comment