Lesson 3 Container Orchestration
OPENSUSE Cloud Native Foundations Scholarship Program
OPENSUSE Cloud Native Foundations Scholarship Program
Get help on the following frequently asked issues
The problem was I was only binding to the localhost interface.
NB: You should be binding to 0.0.0.0 if you want the container to be accessible from outside.
After changing:
if __name__ == '__main__':
app.run()
to
if __name__ == '__main__':
app.run(host='0.0.0.0')
The app was reachable.
First please run the command kubectl get po podname in order go get the error description.
If the error message is "Error: failed to create containerd container: get apparmor_parser version: exec: "apparmor_parser": executable file not found in $PATH" then quick fix is to run below line in the command prompt
zypper install -t pattern apparmor
Adding "RUN go mod init" line before "RUN go build..." into the Dockerfile solves this issue.
Most probably, you entered the container URL incorrectly when deploying the Kubernetes cluster. Please double check your container URL in the Docker Hub. We might be wrong as well. To get a more accurate error message run to check on more details of what is going on:
kubectl describe po PODNAME
kubectl label deploy nginx-alpine app=nginx tag=alpine --namespace demo
error: 'app' already has a value (nginx-alpine), and --overwrite is false
Are we meant to overwrite it?
Yes, app=nginx is already there, that's why is asking to overwrite, hence you need to add only the tag=alpine Tag or you can add --overwrite==true
Try this command:
kubectl port-forward --address 0.0.0.0 po/<pod-id> 6111:6111
Take a look at the Vagrantfile. By default, 192.168.50.4 is used as a fixed IP address there so on your local machine, browse 192.168.50.4:6111
You probably have a Mac computer but depending on the OS version it can be solvable or not. Please look at the following forum article for the solution virtualbox.org • View topic - Installation on MacOS 10.15.1 fails . If you are using M1 know that Virtualbox does not support M1.
M1 MacOS instructions* for replacing VirtualBox. This will install k8s
brew install kind
brew install kubectl
kind create cluster
kubectl get no
Disable the virtual box network adapters in the control panel (Windows 10), then use the vagrant reload command in Git Bash
The command is wget -qO- IP Address
i solved it doing the following steps:
Go to Device Manager on Windows (type "Device Manager" on the botton left lens)
Click on Network Adapter
and then right click and disable any "VitualBox Host-Only Ethernet Adapter" and re-enable it.
now vagrant up should work.
The error was gone after restarting the PC and signing in to Docker Desktop App https://forums.docker.com/t/restart-docker-service-from-command-line/27331/10
Enabling virtualization in the computer BIOS helps. Here is the link
To fix this issue, Run the command below to tell the kubernetes where to find the configuration file:
[Environment]::SetEnvironmentVariable("KUBECONFIG", $HOME + ".kube\config", [EnvironmentVariableTarget]::Machine)
Please make sure to replace $HOME + ".kube\config" with "/etc/rancher/k3s/k3s.yaml" if you have k3s installed.
You need to go into Windows Features and uncheck BOTH Hyper-V as well as Containers. Reinstalling the latest Virtualbox and rebooting your PC should help.
You need to add your user name using sudo usermod -aG docker USER
This is typically because you don't have VT-x or AMD-V enabled in your BIOS. Or worse yet, your CPU doesn't support virtualization. Following are the instructions if you have the first case.
It means that the OpenSuSe version you are trying to pull is not available. In your Vagrantfile comment or remove the line that says config.vm.box_version
Kernel driver not installed (VERR_VM_DRIVER_NOT_INSTALLED)
It has to do with permissions in your operating system. Please follow this article to fix it.
Some app is already using port 6111, try picking any other port.