This repository has been archived by the owner on Apr 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 73
Document Red Hat user namespace configurations #811
Open
jgallucci32
wants to merge
2
commits into
gitpod-io:master
Choose a base branch
from
jgallucci32:patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
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
38 changes: 38 additions & 0 deletions
38
src/docs/self-hosted/0.5.0/install/additional-kubernetes-configs.md
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,38 @@ | ||
--- | ||
url: /docs/self-hosted/0.5.0/install/additional-kubernetes-configs/ | ||
--- | ||
|
||
# Additional Kubernetes configurations | ||
|
||
While Gitpod deploys to native Kubernetes environments, several vendor-specific configurations must be made to ensure compatability with the deployment: | ||
* Enable User namespaces options for Kubernetes running on Red Hat Enterprise Linux | ||
* Grant access to `/var/gitpod` for Rancher Kubernetes custers | ||
|
||
## Enable User namespaces options for Kubernetes running on Red Hat Enterprise Linux | ||
|
||
The Docker-in-Docker image requires user namespaces to be enabled or the `image-builder` pod will fail to start with the error `OCI runtime create failed` because Red Hat Enterprise Linux (or CentOS) does not have user namespaces enabled by default. To enable user namespaces on RHEL/CentOS: | ||
1. Add option to kernel | ||
``` | ||
grubby --args="namespace.unpriv_enable=1" --update-kernel=/boot/vmlinuz-$(uname -r) | ||
``` | ||
2. Modify sysctl.conf | ||
``` | ||
echo "user.max_user_namespaces=15076" >> /etc/sysctl.conf | ||
``` | ||
3. Assign users and groups to be mapped by user namespaces | ||
``` | ||
echo dockremap:808080:1000 >> /etc/subuid | ||
echo dockremap:808080:1000 >> /etc/subgid | ||
``` | ||
4. Reboot host for changes to take effect | ||
|
||
See [Red Hat Documentation](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_atomic_host/7/html/getting_started_with_containers/using_the_docker_command_and_service#user_namespaces_options) for more information. | ||
|
||
## Grant access to `/var/gitpod` for Rancher Kubernetes custers | ||
|
||
Rancher’s kubelet runs in a container and needs to be given explicit access to the `/var/gitpod/` path. This configuration prevents the `hostPath type check failed` error when initializing a workspace. To enable access, add the following to the cluster's `cluster.yml` manifest: | ||
```yaml | ||
kubelet: | ||
extra_binds: | ||
- '/var/gitpod:/var/gitpod' | ||
``` |
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
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.
problem: the pull-request targets the wrong repository.
The Gitpod documentation (for now, maybe not in the future) layers
master
of https://github.com/gitpod-io/gitpod/tree/master/docs/self-hosted as a submodule into this repository. If @meysholdt gives the 👍 in review then these changes need to be sent there as well as here.