generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Frequently Asked Questions #247
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# Frequently Asked Questions | ||
|
||
The present document lists a couple of frequently asked questions from our users and adopters. | ||
|
||
## How do I use x CNI with cluster? | ||
|
||
There is a great chance your tenant cluster CNI will conflict with infrastructure's cluster CNI. | ||
To avoid issues, you need first to make sure you are using VXLAN on your CNI, and a customized PORT. Below you can find a few examples: | ||
|
||
### Calico | ||
|
||
To use Calico CNI, you need to set `CALICO_IPV4POOL_IPIP` to `Never` and `CALICO_IPV4POOL_VXLAN` to `Always`. To customize your VXLAN port, you need to set `FELIX_VXLANPORT` to the customized port number. | ||
|
||
### Cilium | ||
|
||
To use Cilium CNI, make sure your `tunnel` is set to `vxlan`. To customize your VXLAN port, you need to set `tunnel-port` to the customized port number. | ||
|
||
### Flannel | ||
|
||
To use Flannel you will need to define your `Backend` manually in `net-conf.json` file, usually inside your `ConfigMap`. You must set `Type` to `vxlan` and `Port` to your customized port number, like the example below: | ||
``` | ||
net-conf.json: | | ||
{ | ||
"Network": "10.243.0.0/16", | ||
"Backend": { | ||
"Type": "vxlan", | ||
"Port": 1234 | ||
} | ||
} | ||
``` | ||
|
||
## Whenever I reboot a VM in Kubevirt, it looses is IP address, how do I fix it? | ||
|
||
Unfortunately anyone using cluster-api-provider-kubevirt to manage long-lived clusters that are not ephemeral will suffer from this. Basically there are 3 paths to workaround this issue for now: | ||
|
||
* Use a CNI that provides stable IP addresses, like for example `kube-ovn` or `ovn-k`. | ||
* Use a secondary network with Multus to attach this secondary network to the VirtualMachines. This will involve assigning static MAC addresses to the VirtualMachine through something like `kubemacpool` and map those MAC addresses to IP addresses on a DHCP server in that network. | ||
* Use ephemeral VirtualMachines by defining `spec.template.spec.virtualMachineTemplate.spec.runStrategy` to `Once` in your `KubevirtMachineTemplate`. | ||
|
||
|
||
## How do I use disk images that are not in a container registry? | ||
|
||
You can use [Containerized Data Importer | ||
](https://github.com/kubevirt/containerized-data-importer) as a solution to work with your disks on Kubevirt. The `DataVolume` definition would go inside `spec.template.spec.virtualMachineTemplate.spec.dataVolumeTemplates` inside your `KubevirtMachineTemplate`. An example to import an image from http would be: | ||
``` | ||
dataVolumeTemplates: | ||
- apiVersion: cdi.kubevirt.io/v1beta1 | ||
kind: DataVolume | ||
metadata: | ||
annotations: | ||
cdi.kubevirt.io/storage.deleteAfterCompletion: "false" | ||
name: my-data-volume | ||
namespace: default | ||
spec: | ||
pvc: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 40Gi | ||
storageClassName: hostpath-csi | ||
source: | ||
http: | ||
url: https://example.com/image.qcow2 | ||
``` | ||
|
||
After defining the `DataVolume` it needs to be added as a volume in your `KubevirtMachineTemplate` under `spec.template.spec.virtualMachineTemplate.spec.template.spec.volumes`. For the example provided this would look like: | ||
``` | ||
volumes: | ||
- dataVolume: | ||
name: my-data-volume | ||
name: disk1 | ||
``` | ||
|
||
## Is it possible to use a VirtualMachineClusterInstancetype on my cluster? | ||
|
||
Yes, you can use either `VirtualMachineClusterInstancetype` or `VirtualMachineInstancetype`. To use it, you just need to set it under `spec.template.spec.virtualMachineTemplate.spec.instancetype` in your `KubevirtMachineTemplate`. | ||
Assuming you have a `VirtualMachineClusterInstancetype` named `standard`, this is how the setting would look like: | ||
``` | ||
instancetype: | ||
kind: VirtualMachineClusterInstancetype | ||
name: standard | ||
``` | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looses/loses
also, this shouldn't be a problem. restarting a vm will result in a new ip, but i believe kubernetes is resilient to nodes having a different ip after restart.
does this for sure cause an issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what I was trying to document here.
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yes, ha, i remember that now. I had experimented with worker nodes receiving new IP addresses after restart with some success, but it is true that control plane nodes offer a different set of challenges