Urine does not normally contain glucose. If the blood glucose level goes above a certain level, then some glucose 'spills' through the kidneys into the urine. A simple 'dipstick' test can detect glucose in a sample of urine. If you have glucose in your urine, you are likely to have diabetes.
However, some people have kidneys that are more 'leaky', and glucose may leak into urine with a normal blood level. Therefore, if your urine contains any glucose you should have a blood test to measure the blood level of glucose to confirm, or rule out, diabetes.