Procedure
- Follow the procedure in Changed in 51.0.0.0 Installing the virtual appliance to install the virtual
appliance.
- Log in as a privileged user to the system that hosts the App Host software.
- Copy the downloaded App Host,
k3s-airgap-images
, and private repository self-signed cert
(domain.crt) files to this system.
- Add the private repository self-signed cert (domain.crt) to the
trust certificates.
cp <cert_file> /etc/pki/ca-trust/source/anchors
update-ca-trust extract
If it is a certificate chain, add the root certificate to trusted certs.
- If the DNS name cannot be resolved, add the domain to
/etc/hosts
.
192.168.xxx.1 <registry_dns_name>
- Place the
k3s-airgap-images .tar
file in the images directory.
sudo mkdir -p /var/lib/rancher/k3s/agent/images/
sudo cp <k3s-airgap-images tar file> /var/lib/rancher/k3s/agent/images/
- Create the registries.yaml file:
sudo vi /etc/rancher/k3s/registries.yaml
Make sure that there are two mirrors in the
registries.yaml file, one for
docker.io and another for
quay.io. For both mirrors, the
endpoint is the private repository URL. See the following example.
mirrors:
docker.io:
endpoint:
- "<private registry URL>"
quay.io:
endpoint:
- "<private registry URL>"
configs:
"<private registry URL>":
auth:
username: xxx # this is the registry username
password: xxx # this is the registry password
tls: # if needed
cert_file: # path to the cert file used in the registry
key_file: # path to the key file used in the registry
ca_file: # path to the ca file used in the registry
- Restart K3s Kubernetes:
sudo systemctl restart k3s
- Check that all the pods are in the
running
state: If the pods are in error state (
ImagePullbackOff
or
ImagePullError
), run the following
command:
sudo kubectl rollout restart deployments -n kube-system
- Deploy the App Host containers
with the configured private registry as described in Create an App Host pairing:
sudo manageAppHost install -p <pairing information.json> --registry <registry_URL> --user <username>
- Verify that all pods are in the running state:
Results
The App Host image is successfully
installed and configured to use a private repository.
The next step is to deploy App Host
instances as described in Create an App Host pairing.