Yes, definitely. In fact, researchers claim that restricting carbohydrates significantly improves gylcemic control in people with type 2 diabetes . As far as keto specifically is concerned, studies found that this diet improved blood sugar levels as well as HbA1c and weight in people with diabetes .
However, medical supervision is strongly advised. You may need to adjust (reduce) diabetes medication when following the ketogenic diet, sometimes even after just a few days. If you'd like to learn more about using keto to treat diabetes, there are many excellent books specifically dedicated to diabetes management with low-carb or ketogenic diets, such as those by Richard D Feinman.