Comments (4)
Interim solution for CoreDNS
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: coredns-hpa
namespace: kube-system
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: coredns
minReplicas: 3
maxReplicas: 5
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 75
However, because CoreDNS has a topologyspread and the others don't, this can't be applied to local-path-provisioner and metrics-server.
from k3s-ansible.
Thats not how those components work. CoreDNS, local-path-provisioner, metrics-server are deployed on the cluster as a whole, not on every server. They aren't considers server specific components, like kube-apiserver or the controller manager. They are just regular workloads. If you want to modify them, see https://docs.k3s.io/helm#customizing-packaged-components-with-helmchartconfig, you can create /var/lib/rancher/k3s/server/manifests/coredns-ha.yaml
with the modifications you want.
from k3s-ansible.
Thats not how those components work. CoreDNS, local-path-provisioner, metrics-server are deployed on the cluster as a whole, not on every server. They aren't considers server specific components, like kube-apiserver or the controller manager. They are just regular workloads. If you want to modify them, see https://docs.k3s.io/helm#customizing-packaged-components-with-helmchartconfig, you can create
/var/lib/rancher/k3s/server/manifests/coredns-ha.yaml
with the modifications you want.
Offering a supposedly highly available deployment option and then replying "lol roll your own" is a bit shortsighted, no? Deploying coredns as a DaemonSet on the master nodes (as I now plan to do) for example could at least be given an inch of consideration. At some point there's been a conscious choice to include these "regular workloads" and assign them as part of the core k3s experience. (since you have to really go out of your way to get rid of them once installed, or do this pre-install with obscured args)
The fact of the matter is that the current HA deployment of k3s simply isn't HA because of these "regular workloads" you essentially push onto the user are essential to basic cluster operations (how does one operate a cluster when DNS, monitoring and file provisioner went poof because one of out 3 nodes is rebooting/broken?)
This has been brought up and iterated on before:
k3s-io/k3s#1606
from k3s-ansible.
I understand your frustration with this. I totally get the "well this isn't HA really is it" argument. Two things on this:
- This isn't something that the k3s-ansible repo is meant to solve. This repo only covers deploying vanilla K3s with a few config options. I added the
extra_manifests
configuration to help enable exactly this scenario, where you can easily supply manifest files you want deployed automatically when provisioning a cluster. - As covered in k3s-io/k3s#1606, this was ultimately a design decision between resource usage and redundancy. As K3s is usually deployed on the edge in resource constrained environments, we decided that by default, deploying less pods was the better strategy. K3s is an opinionated K8s distro. At the same time, deploying modifications for things you don't like is a core mission of K3s. Its why its so easy to use the
--disable
flag to turn of components you don't like and swap them out. So many people disable traefik and run metalLB. Similarly, you are free to simply modify the manifests to include a replica configuration of 2+.
I think we could help alleviate this somewhat by having better documentation in https://github.com/k3s-io/docs about how do go about modify the helm manifest and perhaps include and example of "making CoreDNS run with multiple replicas".
from k3s-ansible.
Related Issues (20)
- Adding new worker node to an existing cluster failed HOT 1
- Add the ability to set firewall rules for custom CIDR ranges
- Support using an auto-generated token HOT 7
- k3s-server: overwrites user's `~/.kube/config` even when a different `kubeconfig` value is provided
- k3s-agents fail to start due to being unable to grab the CA certs HOT 1
- The k3s_upgrade role is broken when SELinux is enabled HOT 1
- prereq fails at ufw step HOT 3
- Make passing a token optional HOT 1
- Error in 'ansible.posix.sysctl' due to Ansible migrations? HOT 3
- airgap install bug
- Installation fails when on Rpi when booting from network
- Add ability to define custom cluster context name in kubeconfig instead of 'k3s-ansible'
- Is these roles available through ansible-galaxy? HOT 2
- add feature Setup optional private registry configuration
- ansible lint, playbooks folder, and firewalld HOT 2
- Airgap no file was found when using first_found HOT 5
- Hard Coded Group name for k3s servers HOT 2
- use of import_playbook
- README file code blocks mention playbook instead of the recently updated playbooks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from k3s-ansible.