|
| 1 | +# Frequently Asked Questions (FAQ) |
| 2 | + |
| 3 | +Common questions about Kimia. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## General Questions |
| 8 | + |
| 9 | +### Q: How does Kimia differ from Kaniko? |
| 10 | + |
| 11 | +**A:** Kimia uses user namespaces for true rootless operation (runs as UID 1000), while Kaniko runs as root (UID 0). Kimia also provides: |
| 12 | +- Better support for complex Dockerfiles with ownership changes |
| 13 | +- Native reproducible builds |
| 14 | +- Pod Security Standards (Restricted) compliance |
| 15 | + |
| 16 | +See the [Comparison Guide](comparison.md) for details. |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +### Q: Can I use Kimia outside Kubernetes? |
| 21 | + |
| 22 | +**A:** Yes! Kimia can run as a standard container: |
| 23 | + |
| 24 | +```bash |
| 25 | +docker run \ |
| 26 | + --cap-drop ALL \ |
| 27 | + --cap-add SETUID \ |
| 28 | + --cap-add SETGID \ |
| 29 | + --security-opt seccomp=unconfined \ |
| 30 | + --security-opt apparmor=unconfined \ |
| 31 | + -v $(pwd):/workspace \ |
| 32 | + ghcr.io/rapidfort/kimia:latest \ |
| 33 | + --context=/workspace --destination=registry/image:tag |
| 34 | +``` |
| 35 | + |
| 36 | +--- |
| 37 | + |
| 38 | +### Q: Does Kimia support multi-architecture builds? |
| 39 | + |
| 40 | +**A:** Yes, use the `--custom-platform` flag: |
| 41 | + |
| 42 | +```bash |
| 43 | +kimia --custom-platform=linux/arm64 ... |
| 44 | +``` |
| 45 | + |
| 46 | +--- |
| 47 | + |
| 48 | +### Q: What's the difference between kimia and kimia-bud? |
| 49 | + |
| 50 | +**A:** Both provide the same functionality and security: |
| 51 | +- **kimia**: Based on BuildKit |
| 52 | +- **kimia-bud**: Based on Buildah |
| 53 | + |
| 54 | +Choose based on your preference - both support the same Kimia CLI arguments. |
| 55 | + |
| 56 | +--- |
| 57 | + |
| 58 | +## Technical Questions |
| 59 | + |
| 60 | +### Q: Why do I need user namespaces? |
| 61 | + |
| 62 | +**A:** User namespaces provide security isolation. They map container UIDs to unprivileged host UIDs, so even if a container escapes, the attacker only has unprivileged access. |
| 63 | + |
| 64 | +--- |
| 65 | + |
| 66 | +### Q: What are SETUID and SETGID capabilities for? |
| 67 | + |
| 68 | +**A:** These minimal capabilities allow Kimia to create user namespaces. They're far safer than: |
| 69 | +- Privileged mode |
| 70 | +- CAP_SYS_ADMIN |
| 71 | +- Running as root |
| 72 | + |
| 73 | +--- |
| 74 | + |
| 75 | +### Q: Can I use Kimia with distroless images? |
| 76 | + |
| 77 | +**A:** Yes! Kimia supports building any OCI-compliant image, including distroless. |
| 78 | + |
| 79 | +--- |
| 80 | + |
| 81 | +### Q: When should I use Docker format vs OCI format? |
| 82 | + |
| 83 | +**A:** Use Docker format (`BUILDAH_FORMAT=docker`) when your Dockerfile contains: |
| 84 | +- `HEALTHCHECK` instruction |
| 85 | +- `SHELL` instruction |
| 86 | +- `STOPSIGNAL` |
| 87 | + |
| 88 | +Otherwise, use the default OCI format. |
| 89 | + |
| 90 | +--- |
| 91 | + |
| 92 | +## Operational Questions |
| 93 | + |
| 94 | +### Q: How much resource overhead does Kimia add? |
| 95 | + |
| 96 | +**A:** Minimal - typically: |
| 97 | +- 2-5% CPU overhead |
| 98 | +- 256MB-2GB RAM depending on build complexity |
| 99 | +- Similar performance to Kaniko and other builders |
| 100 | + |
| 101 | +--- |
| 102 | + |
| 103 | +### Q: Can I run multiple Kimia builds simultaneously? |
| 104 | + |
| 105 | +**A:** Yes! Kimia is designed for concurrent builds. Each build is isolated in its own user namespace. |
| 106 | + |
| 107 | +--- |
| 108 | + |
| 109 | +### Q: Does Kimia work with private registries? |
| 110 | + |
| 111 | +**A:** Yes, Kimia supports authentication with any OCI-compliant registry. |
| 112 | + |
| 113 | +--- |
| 114 | + |
| 115 | +### Q: Will my existing Kaniko configurations work? |
| 116 | + |
| 117 | +**A:** Most Kaniko arguments are directly compatible. You need to: |
| 118 | +1. Add proper securityContext (runAsUser: 1000, fsGroup: 1000) |
| 119 | +2. Add capabilities (SETUID, SETGID) |
| 120 | +3. Change volume mount path from `/kaniko/.docker` to `/home/kimia/.docker` |
| 121 | + |
| 122 | +See the [Migration Guide](comparison.md#migration-from-kaniko-to-kimia). |
| 123 | + |
| 124 | +--- |
| 125 | + |
| 126 | +### Q: Why is my cache directory giving permission errors? |
| 127 | + |
| 128 | +**A:** The cache directory must be writable by UID 1000. Solutions: |
| 129 | + |
| 130 | +```yaml |
| 131 | +# Solution 1: Use fsGroup (recommended) |
| 132 | +securityContext: |
| 133 | + fsGroup: 1000 |
| 134 | + |
| 135 | +# Solution 2: Use emptyDir |
| 136 | +volumes: |
| 137 | +- name: cache |
| 138 | + emptyDir: {} |
| 139 | + |
| 140 | +# Solution 3: Init container |
| 141 | +initContainers: |
| 142 | +- name: fix-perms |
| 143 | + image: busybox |
| 144 | + command: ['chown', '-R', '1000:1000', '/cache'] |
| 145 | + securityContext: |
| 146 | + runAsUser: 0 |
| 147 | +``` |
| 148 | +
|
| 149 | +--- |
| 150 | +
|
| 151 | +## Security Questions |
| 152 | +
|
| 153 | +### Q: Is Kimia secure for production? |
| 154 | +
|
| 155 | +**A:** Yes! Kimia provides defense-in-depth security: |
| 156 | +- Rootless operation (UID 1000) |
| 157 | +- User namespace isolation |
| 158 | +- Minimal capabilities (SETUID, SETGID only) |
| 159 | +- Pod Security Standards (Restricted) compliant |
| 160 | +- No privileged mode required |
| 161 | +
|
| 162 | +--- |
| 163 | +
|
| 164 | +### Q: How does Kimia compare to building with Docker? |
| 165 | +
|
| 166 | +**A:** Kimia is more secure than Docker: |
| 167 | +- No Docker daemon required (reduced attack surface) |
| 168 | +- Runs as non-root |
| 169 | +- User namespace isolation |
| 170 | +- Kubernetes-native |
| 171 | +
|
| 172 | +--- |
| 173 | +
|
| 174 | +### Q: Can Kimia be used in regulated environments? |
| 175 | +
|
| 176 | +**A:** Yes! Kimia supports: |
| 177 | +- Reproducible builds for supply chain security |
| 178 | +- Pod Security Standards compliance |
| 179 | +- Audit logging integration |
| 180 | +- Image signing (via Cosign) |
| 181 | +- SBOM generation |
| 182 | +
|
| 183 | +--- |
| 184 | +
|
| 185 | +## Troubleshooting Questions |
| 186 | +
|
| 187 | +### Q: Error: "failed to create user namespace" |
| 188 | +
|
| 189 | +**A:** User namespaces are not enabled. Enable them: |
| 190 | +
|
| 191 | +```bash |
| 192 | +sudo sysctl -w user.max_user_namespaces=15000 |
| 193 | +echo "user.max_user_namespaces=15000" | sudo tee -a /etc/sysctl.conf |
| 194 | +``` |
| 195 | + |
| 196 | +--- |
| 197 | + |
| 198 | +### Q: Error: "permission denied" |
| 199 | + |
| 200 | +**A:** Check your security context: |
| 201 | + |
| 202 | +```yaml |
| 203 | +securityContext: |
| 204 | + runAsUser: 1000 |
| 205 | + fsGroup: 1000 # Important! |
| 206 | + allowPrivilegeEscalation: true |
| 207 | + capabilities: |
| 208 | + add: [SETUID, SETGID] |
| 209 | +``` |
| 210 | +
|
| 211 | +--- |
| 212 | +
|
| 213 | +### Q: Build is slow, how do I speed it up? |
| 214 | +
|
| 215 | +**A:** Enable caching and optimize resources: |
| 216 | +
|
| 217 | +```yaml |
| 218 | +args: |
| 219 | + - --cache |
| 220 | + - --cache-dir=/cache |
| 221 | + - --storage-driver=overlay # Faster |
| 222 | + |
| 223 | +resources: |
| 224 | + requests: |
| 225 | + memory: "4Gi" |
| 226 | + cpu: "2" |
| 227 | +``` |
| 228 | +
|
| 229 | +See [Performance Guide](performance.md). |
| 230 | +
|
| 231 | +--- |
| 232 | +
|
| 233 | +## Migration Questions |
| 234 | +
|
| 235 | +### Q: How long does migration from Kaniko take? |
| 236 | +
|
| 237 | +**A:** Typically 1-2 days: |
| 238 | +- Day 1: Test in development |
| 239 | +- Day 2: Roll out to staging/production |
| 240 | +
|
| 241 | +See [Migration Guide](comparison.md#migration-from-kaniko-to-kimia). |
| 242 | +
|
| 243 | +--- |
| 244 | +
|
| 245 | +### Q: Can I run Kimia and Kaniko side-by-side? |
| 246 | +
|
| 247 | +**A:** Yes! Many organizations use both: |
| 248 | +- Kimia for production (security-critical) |
| 249 | +- Kaniko for development (faster setup) |
| 250 | +
|
| 251 | +--- |
| 252 | +
|
| 253 | +## Still Have Questions? |
| 254 | +
|
| 255 | +- 📖 [Documentation](../README.md) |
| 256 | +- 🔧 [Troubleshooting](troubleshooting.md) |
| 257 | +- 💬 [GitHub Discussions](https://github.com/rapidfort/kimia/discussions) |
| 258 | +- 🐛 [Report an Issue](https://github.com/rapidfort/kimia/issues) |
| 259 | +
|
| 260 | +--- |
| 261 | +
|
| 262 | +[Back to Main README](../README.md) |
0 commit comments