Managed Kubernetes Service
1. Creating small kubernetes cluster (3 nodes)
- Creating cluster might take ~30 min
2. Installation of kubectl - how-to
3. Establishing connection with cluster
- Download kubeconfig file from OVHcloud manager
-
Copy file to instance
scp -i ~/roadshow-workspace/key kubeconfig.yml ubuntu@<public_ip>:~/
Copy file content to clipboard and paste into file ~/kubeconfig.yml on the instance.
-
We use copied config file to connect to cluster.
export KUBECONFIG=~/kubeconfig.yml
4. New service creation
-
List cluster nodes
kubectl get nodes
-
Create new pod with Nginx image
kubectl run demo-nginx --image=nginx --port 80
-
Publish simple page on the Internet
kubectl expose pod demo-nginx --type=LoadBalancer
-
Find out LoadBalancer address for newly created Pod
kubectl get service demo-nginx
-
Check if the website is visible with web browser