Skip to content

Managed Kubernetes Service

1. Creating small kubernetes cluster (3 nodes)

  1. Creating cluster might take ~30 min

2. Installation of kubectl - how-to

3. Establishing connection with cluster

  1. Download kubeconfig file from OVHcloud manager download kubeconfig
  2. 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.

  3. We use copied config file to connect to cluster.

    export KUBECONFIG=~/kubeconfig.yml
    

4. New service creation

  1. List cluster nodes

    kubectl get nodes
    

  2. Create new pod with Nginx image

    kubectl run demo-nginx --image=nginx --port 80
    

  3. Publish simple page on the Internet

    kubectl expose pod demo-nginx --type=LoadBalancer
    

  4. Find out LoadBalancer address for newly created Pod

    kubectl get service demo-nginx
    

  5. Check if the website is visible with web browser check website