Hi, I am very much new to kubernetes and trialing out the DO managed kubernetes product and have some questions that i need help with - struggling to find clear guides/docs describing the following:

Autoscaling

  • What is the difference between using kubectl autoscale... and doctl kubernetes cluster node-pool ... (or via the dashboard) to configure autoscaling? Do they have the same effect?
  • What confuses me is the kubectl allows for the –cpu-percent parameter which determines when the pods scale up, but it is not clear what controls doctl…

Docker images

  • Is it possible to build & deploy a docker image directly to kubernetes without needing to use a registry such as dockerhub?

Security:

  • Network
    • Firewall: firewall was created by default with the cluster, but not much detail on what exactly it is filtering?
    • My interpretation of the rules are that it blocks all traffic to the cluster except on ports: 30000-32767 is that correct?

Context on my environment:

  • Load balancer
  • Cluster
    • Express Node web api
    • one node with two pods
  • Managed Postgresdb

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi there,

  1. Yes there is a difference between the two. The first command kubectl autoscale automatically scales out your pod replicas of a given deployment. The second command automatically scales out the number of nodes in your cluster if your other ones resources are all used.
    doctl scales up nodes when there are pods stuck in pending due to the not enough resources. You can find documentation on the upstream autoscaler here: https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#basics

  2. Yes, container images need to be in a accessible registry that nodes can pull the image from in order to run them.

  3. Yes that is correct. The range allowed here is the default nodeport range for kubernetes services. We are working on making this firewall configuration more flexible. https://kubernetes.io/docs/concepts/services-networking/service/#nodeport

Regards,

John Kwiatkoski
Senior Developer Support Engineer - Kubernetes

Submit an Answer