Question

General: autoscaling & security

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

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

John Kwiatkoski
DigitalOcean Employee
DigitalOcean Employee badge
March 30, 2020
Accepted 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

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel