Experimental Features

Overview

If you want to get early access to some upcoming features and experiment, you can set the environment variable MINISHIFT_ENABLE_EXPERIMENTAL, which makes additional feature flags available:

  1. $ export MINISHIFT_ENABLE_EXPERIMENTAL=y

Experimental features are not officially supported, and might break or result in unexpected behavior. To share your feedback on these features, you are welcome to contact the Minishift community.

Enabling Experimental oc cluster up Flags

By default, Minishift does not expose all oc cluster up flags in the Minishift CLI.

You can set the MINISHIFT_ENABLE_EXPERIMENTAL environment variable to enable the following options for the minishift start command:

extra-clusterup-flags

Enables passing flags directly to oc cluster up that are not directly exposed in the Minishift CLI.

Using the experimental flag, to enable the Service Catalog in OKD 3.10 or in later versions, the command is:

  1. $ MINISHIFT_ENABLE_EXPERIMENTAL=y minishift start --extra-clusterup-flags "--enable=*,service-catalog"

The recommended way to enable service catalog is minishift openshift component add command.

Local Proxy Server

To help in the situation when security certificates are used in the organization, but can not easily be shared with the instance, Minishift can run a local proxy server on the host, which the Minishift instance can use to access external resources.

Enabling the proxy server is done using the following command:

  1. $ minishift config set local-proxy true

This will start a proxy server on the host which will be automatically assigned to the Minishift instance.

When the corporate or upstream proxy is known, you can specify this with the following configuration option:

  1. $ minishift config set local-proxy-upstream http(s)://[username:password@]host:port

When this option is used, all traffic will be re-encrypted with a Minishift specific certificate. For this reason, this proxy should only be used for development and use with Minishift.

To allow external traffic to your local host you might have to enable port 3128/tcp in your host firewall.

Local DNS Server

Minishift provides a DNS server for offline usage or the possibility of overriding DNS records while testing. This will allow you to access the OpenShift routes without Internet.

The DNS server is specific to a profile.

Starting the DNS server can be done as follows:

  1. $ minishift dns start

After starting the DNS server you need to configure your device settings to use this nameserver. The start command will show you a temporary option that can be used when you entered offline usage.

In the current implementation you need to start the server and do required changes in the host settings manually. The DNS configuration is not permanent and might reset when the network state of the device changes.

Stopping the DNS server can be done as follows:

  1. $ minishift dns stop

To get the status of the DNS server:

  1. $ minishift dns status

Local DNS Setup for macOS

Recent versions of macOS do not send out DNS queries in offline mode, and the process for using a local DNS server from Minishift is more involved than other operating systems.

Enable tap devices

Check for the presence of tap devices in /dev:

  1. $ ls /dev | grep tap

If no tap devices are present, install the tuntap package:

  1. $ brew install tuntap

Use a tap device to create a network service

As root, open the /Library/Preferences/SystemConfiguration/preferences.plist file and add the following XML under the <key>NetworkServices</key> element:

  1. <key>D16F22CE-6DDE-4E63-837C-E16538EA5CCB</key> (1)
  2. <dict>
  3. <key>DNS</key>
  4. <dict />
  5. <key>IPv4</key>
  6. <dict>
  7. <key>Addresses</key>
  8. <array>
  9. <string>10.10.90.1</string> (2)
  10. </array>
  11. <key>ConfigMethod</key>
  12. <string>Manual</string>
  13. <key>SubnetMasks</key>
  14. <array>
  15. <string>255.255.0.0</string>
  16. </array>
  17. </dict>
  18. <key>IPv6</key>
  19. <dict>
  20. <key>ConfigMethod</key>
  21. <string>Automatic</string>
  22. </dict>
  23. <key>Interface</key>
  24. <dict>
  25. <key>DeviceName</key>
  26. <string>tap0</string> (3)
  27. <key>Hardware</key>
  28. <string>Ethernet</string>
  29. <key>Type</key>
  30. <string>Ethernet</string>
  31. <key>UserDefinedName</key>
  32. <string>MiniTap</string> (4)
  33. </dict>
  34. <key>Proxies</key>
  35. <dict>
  36. <key>ExceptionsList</key>
  37. <array>
  38. <string>*.local</string>
  39. <string>169.254/16</string>
  40. </array>
  41. <key>FTPPassive</key>
  42. <integer>1</integer>
  43. </dict>
  44. <key>SMB</key>
  45. <dict />
  46. <key>UserDefinedName</key>
  47. <string>MiniTap</string> (4)
  48. </dict>
1This is the UUID for the network service. Replace this value with the output of uuidgen.
2The IP address for the network service.
3The /dev/tap device to use.
4Name for the network service (This will appear in the Network Preferences GUI).

Adding the Network Service to ServiceOrder array

In the /Library/Preferences/SystemConfiguration/preferences.plist file, look for the <key>ServiceOrder</key> element. As root, append the UUID for our MiniTap network service to this array.

  1. <key>ServiceOrder</key>
  2. <array>
  3. <string>06BFF3C7-13DA-420F-AE9C-B036401184D7</string>
  4. <string>58231F56-CA25-4D41-930F-46D83CA07BFE</string>
  5. <string>304203B0-AC87-459F-9761-C2799EEBB2E3</string>
  6. <string>8655D244-C6E7-4CC0-BF06-BB18F9C3BB85</string>
  7. <string>3C26FB9D-D918-4B79-9C7B-ADECD8EFE00F</string>
  8. <string>D16F22CE-6DDE-4E63-837C-E16538EA5CCB</string> (1)
  9. </array>
1The UUID for MiniTap network service.

Adding the Network Service to Service dictionary

In the /Library/Preferences/SystemConfiguration/preferences.plist file, look for the <key>Service</key> element. As root, append the following XML to its dictionary:

  1. <key>Service</key>
  2. <dict>
  3. <key>06BFF3C7-13DA-420F-AE9C-B036401184D7</key>
  4. <dict>
  5. <key>__LINK__</key>
  6. <string>/NetworkServices/06BFF3C7-13DA-420F-AE9C-B036401184D7</string>
  7. </dict>
  8. <key>304203B0-AC87-459F-9761-C2799EEBB2E3</key>
  9. <dict>
  10. <key>__LINK__</key>
  11. <string>/NetworkServices/304203B0-AC87-459F-9761-C2799EEBB2E3</string>
  12. </dict>
  13. <key>3C26FB9D-D918-4B79-9C7B-ADECD8EFE00F</key>
  14. <dict>
  15. <key>__LINK__</key>
  16. <string>/NetworkServices/3C26FB9D-D918-4B79-9C7B-ADECD8EFE00F</string>
  17. </dict>
  18. <key>58231F56-CA25-4D41-930F-46D83CA07BFE</key>
  19. <dict>
  20. <key>__LINK__</key>
  21. <string>/NetworkServices/58231F56-CA25-4D41-930F-46D83CA07BFE</string>
  22. </dict>
  23. <key>8655D244-C6E7-4CC0-BF06-BB18F9C3BB85</key>
  24. <dict>
  25. <key>__LINK__</key>
  26. <string>/NetworkServices/8655D244-C6E7-4CC0-BF06-BB18F9C3BB85</string>
  27. </dict>
  28. <key>D16F22CE-6DDE-4E63-837C-E16538EA5CCB</key> (1)
  29. <dict>
  30. <key>__LINK__</key>
  31. <string>/NetworkServices/D16F22CE-6DDE-4E63-837C-E16538EA5CCB</string>(2)
  32. </dict>
  33. </dict>
1The UUID of the MiniTap service.
2Replace this UUID with the UUID of your MiniTap service.

Reboot macOS and you should see a MiniTap service in the Network Preferences GUI. This service will be disconnected. To turn it on, issue the following commands:

  1. $ exec 4<>/dev/tap0 (1)
  2. $ ifconfig tap0 10.10.90.1 255.255.0.0 (1) (2)
  3. $ ifconfig tap0 up (1)
1Replace it with the /dev/tap device used by MiniTap Service.
2IP address should be same as the one in the MiniTap Service definition.

Adding resolver config

Create the file /etc/resolver/nip.io with the following content:

  1. nameserver <ip_address_of_the_minishfit_vm>
  2. search_order 1

Minishift System tray

To help the users of Minishift on macOS and Windows perform simple tasks like starting and stoppping a profile from the GUI, the binaries for these platforms can be compiled to include an experimental systemtray. Follow the Developing Minishift guide to setup your development environment.

To build Minishift with system tray use the following command:

  1. $ make systemtray

By default system tray is automatically started on running minishift start. To disable the auto start behaviour use the following command:

  1. $ minishift config set auto-start-tray false

To start the system tray:

  1. $ minishift service start systemtray

Timezone Setup

If you want to set a different timezone from the default one, use the following command:

  1. $ minishift timezone --set <Valid_Timezome>

To check the available timezone, use the following command:

  1. $ minishift timezone --list

To check current timezone of Minishift instance, use the following command:

  1. $ minishift timezone