Skip to content

Instantly share code, notes, and snippets.

@skyrocknroll
Last active August 16, 2024 05:37
Show Gist options
  • Save skyrocknroll/4726b3c34e29fd8a004268e00679d524 to your computer and use it in GitHub Desktop.
Save skyrocknroll/4726b3c34e29fd8a004268e00679d524 to your computer and use it in GitHub Desktop.
[Harvester] #hci #harvester
  • Setup untagged VLAN network also works
  • https://www.belgai.de/blog/harvester/harvester_bridge_network/ add cloud init network data made it to work
  • Loadbalancer creation were failing. Goto settings in harvester and set vip pools.
  • If you add one more extra nic using the untagged network then creating an service object will lead to issue. The best is use the default managment network and create and service object to get an ip in the Subnet.
  • to ssh into vm using clusterIP we can do kubectl port-forward and ssh
  • Goto preferences and enable all the 4 settings including longhorn and rancher UI.
  • We can use Nodeport and forward traffic to host ip and nodeport in Route Virtual servers.
  • When we are port forwarding in router to ingress make sure ingress is configured with static NodePort. so that recreation ingress will always leads to fixed port.
  • nginx ingress with letsencrypt. https://cloud.yandex.com/en/docs/managed-kubernetes/tutorials/ingress-cert-manager

Upgrade

  1. Once intiate update check the pods like hvst-upgrade-xvr9c-post-drain-hnode3-w2pd4 and pre and post pods logs to see the progress.
  2. coredns memory and cpu would be reset to old small value it should be fixed after the first node upgraded. Otherwise cluster name resolution fails which impacts the upgrade and it will be struck
  3. if it is pre-drained struck for long time it mave be waiting for migrating vm rebooting the vm will expedite the upgrades
apiVersion: v1
kind: Service
metadata:
name: nginx-service
spec:
selector:
harvesterhci.io/vmName: nginx
ports:
- name: http
port: 81
targetPort: 80
protocol: TCP
nodePort: 31234
type: LoadBalancer
apiVersion: v1
kind: Service
metadata:
name: nginx-service
spec:
selector:
harvesterhci.io/vmName: nginx
ports:
- name: http
port: 81
targetPort: 80
protocol: TCP
nodePort: 31234
type: LoadBalancer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment