Skip to content

Instantly share code, notes, and snippets.

@bozakov
Last active October 31, 2022 14:51
Show Gist options
  • Save bozakov/ae289c0f84dc88a75a6b426540dca29d to your computer and use it in GitHub Desktop.
Save bozakov/ae289c0f84dc88a75a6b426540dca29d to your computer and use it in GitHub Desktop.

k8s Cluster on IONOS Cloud

  1. In the top menu, go to 'MANAGER' -> 'Kubernetes manager'
  2. Click on '+ Create Cluster' and give it a name (e.g. "DES"). (This can take some time - refreshing the page seems to help to update the status)
  3. Select the newly created Cluster
  4. Click on 'Node pools in Cluster' -> 'Create node pool'. Select an existing Data Center or create a new one (e.g. "playground"). Add a couple of nodes (-> 'Node Count') to the pool.
  5. Select a CPU and "Storage Type" and click on 'Create node pool'

The provisioning takes some time (it may look like nothing is happening). Just wait and/or refresh. After some time, the cluster nodes should appear in your data center, connected to a new 'Internet Access' node.

If you click on that node, you can download the kubeconfig.yaml file for use with the usual kubectl client on your own machine. User kubectl config --kubeconfig=kubeconfig.yaml view to view the downloaded configuration.

On Linux you can set this as your default configuration by defining the variable KUBECONFIG (see here for more infos):

export KUBECONFIG="kubeconfig.yaml"
kubectl config view
# get info on your newly created k8s nodes
kubectl get nodes

You can now deploy a test application:

# deploy nginx webserver example
kubectl apply -f https://k8s.io/examples/application/deployment.yaml
kubectl get pods
kubectl expose deployment nginx-deployment --type=LoadBalancer --name=nginx-test-service
# get external IP
kubectl get service nginx-test-service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment